CY7C65215 XferData() always returns FALSE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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

0 Likes
3 Replies
Anonymous
Not applicable

Hi,

   

Is the firmware loaded on the CY7C65215 chip able to to receive data? Have you tried to send data using any Cypress Supplied Host tools? If so did it succeed?

   

Regards,

   

- Madhu Sudhan

0 Likes
Anonymous
Not applicable

Hi, sorry for not replying for so long time. Holiday period 🙂

   

Meantime I managed do properly transmit data, but only when I changed the chip mode to RS232. I can actually see the data coming out on the oscilloscope.

   

Also, when configured as 2x I2C (SCB0=master and SCB1=slave), I can now see the proper response:

   

[state=SUCCESS status=USBD_STATUS_SUCCESS]997

   

However the notification LED lights Up and stays ON for over 10s, and there is no physical data being sent out (I don't see anything on the oscilloscope).

   

I have already replaced the CY chip - still the same.

   

If it could help - in my target application both channels will be set to I2C slave, so are shorted together on the PCB.

   

For tests I separated them, but it did not help.

   

 

   

Could you please send me a link to any Cypress Supplied Host tool? 

   

What do you mean by "Is the firmware loaded on the CY7C65215 chip able to to receive data?"? There is no need (and is not possible) to load firmware on to this chip.

   

Do you have any other suggestions?

   

 

   

Best regards,

   

LUK

0 Likes
Anonymous
Not applicable

No response? Do anyone know why the I2C data does not get out of the chip and the notification LED stays on for 10sec?

   

Best regards,

   

LUK

0 Likes