9 Replies Latest reply on Oct 23, 2018 9:35 PM by anks

    PSoC 5LP & CyUSB3: can't communicate with endpoints

    user_246598725

      Hi,

       

      I've a PSoC 5LP with two virtual COM ports (EP1 through EP6) and two interrupt endpoints, configured as a IN/OUT pair with 64 bytes packet size and 1ms. Those two endpoints are also accompanied by an interface association descriptor (see attachment) to be able to bind the CyUSB3.sys driver to this interface (this is my understanding of how to use the IADs when the device provides more than one function and/or endpoints for different tasks).

       

      The VCPs are working, but I can't access the interrupt endpoints. The current test setup is as follows:

      I'm using the 'USB control center' application, which is part of the FX3 SDK. The two interrupt endpoints of the device are correctly detected. I select the detected interrupt out endpoint of the device, and send some text to the device, but I'm getting 'error 997'.

       

      The device firmware is merged from the USBFS_UART example source code and the AN56377 'PSoC 3 and PSoC 5LP USB Transfer Types' application note example #1. Using the original AN56377 source code, the device works well, so it's not a faulty hardware. Now, how can I figure out on which side of the USB cable the error is? It's either my driver INF file and the binding to the CyUSB3.sys driver (I doubt because the device manager doesn't show errors, the VCPs are working and the device and the two endpoints are correctly detected by the USB control center application) or my device firmware - but it's simply extended the USBFS_UART example source code by the interrupt endpoint part of the AN56377 example #1 code. So, in fact the main function pseudo code is as follows:

       

      void main(void) {

      //device initialization (same a USBFS_UART code)

      ...

      //main loop

        for(;;) {

          //check for USB configuration change from host

          {...}

          //service USB CDC, extended for two VCPs

          {...}

          //code snippet from AN56377 for interrupt IN/OUT handling

          if(USBFS_1_GetEPState(8) == USBFS_1_OUT_BUFFER_FULL) {

              countI = USBFS_1_GetEPCount(8);

              USBFS_1_ReadOutEP(8, bufferIrx, countI);

              USBFS_1_LoadInEP(7, bufferIrx, countI);

              USBFS_1_EnableOutEP(8);

          }

        }

      }

       

      The main difference from AN56377 is that in my implementation there's only one alternate setting 0, which directly has the two interrupt endpoints assigned. From my understanding, AN56377 needs alternate setting 0 with no endpoints because of the supported bulk interface. That's why I assigned the two endpoints directly to alternate setting 0.

      So, anyone can help me figuring out what's going wrong?

       

      Regards