About CyU3PConnectState() API timing

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

cross mob
Anonymous
Not applicable

Hi,

I have been working in an UVC project. I enabled the usb connection using the API, CyU3PConnectState(CyTrue, CyTrue); (which returns CY_U3P_SUCCESS). And in the immediate next line I call the function CyU3PUsbGetSpeed() to check whether a 3.0 connection is established. But CyU3PUsbGetSpeed() API returns  CY_U3P_NOT_CONNECTED. If I call CyU3PUsbGetSpeed() after sometime it returns CY_U3P_SUPER_SPEED. My understanding is that either (1.) CyU3PConnectState API needs a particular amount of time to configure the connection or (2.) it takes sometime for the CyU3PUsbGetSpeed() to get updated. Please someone clarify my understanding and if possible please share the exact time delay that is required for the CyU3PUsbGetSpeed() to return the correct connection established.

Thanks and Regards,

Ashlin Surey. A

0 Likes
1 Solution
ManaskantD_51
Employee
Employee
Welcome! 25 solutions authored 10 solutions authored

The ConnectState() API just enables the SuperSpeed terminations on the USB 3.0 lines. After this the USB enumeration sequence starts as soon as the USB host detects those terminations. You can use the UsbGetSpeed() API in the USB CONNECT event as by then the USB connection would have been established.

View solution in original post

0 Likes
1 Reply
ManaskantD_51
Employee
Employee
Welcome! 25 solutions authored 10 solutions authored

The ConnectState() API just enables the SuperSpeed terminations on the USB 3.0 lines. After this the USB enumeration sequence starts as soon as the USB host detects those terminations. You can use the UsbGetSpeed() API in the USB CONNECT event as by then the USB connection would have been established.

0 Likes