Anonymous
Not applicable
Aug 02, 2015
06:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 02, 2015
06:32 AM
Hi all,
I can not to overcome the problem described in the topic. I hope one of you could help me.
When I send data out (XferData() on BulkOutEndPt), the function always returns FALSE. UsbdStatusString says [state=UNKNOWN status=UNKNOWN], and the LastError is 997.
I have tried to configure SCB0 and SCB1 in different ways, but it did not help (in general my target is to set both to I2C).
Below is the initial function:
USBDeviceList usbDevices = new USBDeviceList(CyConst.DEVICES_CYUSB); CyUSBDevice usbDev = usbDevices[0] as CyUSBDevice; if (usbDev != null) { outEndpoint = usbDev.BulkOutEndPt; outEndpoint.TimeOut = 2000; } else outEndpoint = null; txBuf[0] = 123;
and the function onClick(), which tries to tx data
int len = 1; if (outEndpoint != null) if (outEndpoint.XferData(ref txBuf, ref len)) textBox1.Text += 'SUCCESS!'; textBox1.Text += CyUSBDevice.UsbdStatusString(outEndpoint.UsbdStatus); textBox1.Text += outEndpoint.LastError;
displayed result is:
[state=UNKNOWN status=UNKNOWN]997
I have tried to change timeout to 10s and even 20s. Still the same.
If it can help, below is the result of
for (byte i = 0; i < usbDev.AltIntfcCount; i++) for (int e = 1; e < usbDev.EndPointCount; e++) textBox1.Text += usbDev.USBCfgs[0].Interfaces.EndPoints.ToString();
<ENDPOINT> Type="BULK" Direction="OUT" Address="01h" Attributes="02h" MaxPktSize="64" DescriptorType="5" DescriptorLength="7" Interval="0" </ENDPOINT> <ENDPOINT> Type="BULK" Direction="IN" Address="82h" Attributes="02h" MaxPktSize="64" DescriptorType="5" DescriptorLength="7" Interval="0" </ENDPOINT> <ENDPOINT> Type="INTERRUPT" Direction="IN" Address="83h" Attributes="03h" MaxPktSize="64" DescriptorType="5" DescriptorLength="7" Interval="10" </ENDPOINT>
What am I missing? Please help me to solve this problem.
Best regards,
LUK
Labels
3 Replies