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

USB superspeed peripherals

KePa_4784036
Level 2
First like received 10 sign-ins 5 replies posted
Level 2

Hi Cypress team,

I'm using your FX3 USB3 controller with a software that uses LibUSB. So far, I'm able to communicate without any problem by using the BULK transfers with Auto DMA. My code is mostly the CyFxSlFifoSync adapted with WinUSB.

Right now, I have a problem where the FX3 device doesn't reenumerate automatically whenever I restart my software. I found the code example AN73609 which is obsolete but still seems to follow my procedure on my software side.

I don't know if there is an event that I should receive on the Cypress firmware side to parse into and reset the communication by calling the CyU3PConnectState sequence whenever I exit my connection with libusb_exit.

I tried to handle the problem by sending a control transfer to call the CyU3PConnectState sequence but there seems to be a competetion between both the firmware and the software side. In other words, my software need the connection to still be opened to close correctly but I still need to send the reset of the communication accordingly.

If you have any ideas of how I should handle it, please let me know 😄

Thank you,

Keven

 

 

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hello Keven,

From the description, I understand that you want to re enumerate the device when the host application is closed. Is that correct?

 If yes, please check if CLEAR_FEATURE request is sent from the host when the host application is closed. If the request is received by the device, you can handle the request according to your application.

Regards,
Rashi

View solution in original post

0 Likes
3 Replies
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hello Keven,

From the description, I understand that you want to re enumerate the device when the host application is closed. Is that correct?

 If yes, please check if CLEAR_FEATURE request is sent from the host when the host application is closed. If the request is received by the device, you can handle the request according to your application.

Regards,
Rashi
0 Likes
KePa_4784036
Level 2
First like received 10 sign-ins 5 replies posted
Level 2

Hi,

Yes! This is exactly what I'm trying to do. I also checked if the CLEAR_FEATURE in the CyFxSlFifoApplnUSBSetupCB was called but it wasn't :

 

if ((bTarget == CY_U3P_USB_TARGET_ENDPT) && (bRequest == CY_U3P_USB_SC_CLEAR_FEATURE) && (wValue == CY_U3P_USBX_FS_EP_HALT))

 

However, I reviewed my host application code and it seems like I needed to add the libusb_reset_device. By doing so, the CLEAR_FEATURE was called and by adding the modifications stated earlier, it reenumerated the device as I wanted to.

Thanks a lot for the help :D,

Keven

0 Likes
Rashi_Vatsa
Moderator
Moderator 500 solutions authored 1000 replies posted 750 replies posted
Moderator

Hi Keven,

Glad to hear that the problem was resolved!

Regards,
Rashi
0 Likes