2 Replies Latest reply on Sep 6, 2015 12:37 PM by user_508539572

    CY7C65215 XferData() always returns FALSE

    user_508539572

      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[i].EndPoints[e].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

        • 1. Re: CY7C65215 XferData() always returns FALSE
          Madhu Lakshmipathy

          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

          • 2. Re: CY7C65215 XferData() always returns FALSE
            user_508539572

            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

            • 3. Re: CY7C65215 XferData() always returns FALSE
              user_508539572

              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