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

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

cross mob
lock attach
Attachments are accessible only for community members.
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

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

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hi,

There are multiple Points here to consider:

>> There was no need for IAD for single Custom interface because IAD is used to bind multiple interfaces.But here it was only one Custom interface.

>>Please install FX3 SDK (if you didn't did so already) from this link because it gives you latest cyusb3 driver and Control Center app.

I am attaching the project and hex file  which worked for me for reference in which I made few changes ( removing a IAD and changing PID mainly)

>>  installed the driver cyusb3.sys for the Custom_interface from this path :

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\driver\bin\win7\x64

Then the Custom Interface will get enumerated.

Then update the remaining CDC Communication Interface0 & 1 by using Usbfs_1_cdc.inf present at this path:

Project_Folder>\Generated_Source\PSoC5

Then after all the proper binding of .inf files , the ports will get enumerated as shown in image Enumeration_custom_CDC.png

View solution in original post

0 Likes
9 Replies