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

cross mob

FX3 does not fall back to USB 2.0 mode when TUSB501 re-drivers are connected with a USB 2.0 cable to the host - KBA231618

FX3 does not fall back to USB 2.0 mode when TUSB501 re-drivers are connected with a USB 2.0 cable to the host - KBA231618

50 questions asked 25 likes received 25 sign-ins

Version: **

See Section 6.8- USB 3.0 and USB 2.0 Function Coordination  of the FX3 Technical Reference Manual (TRM) for the procedure used by FX3 firmware for USB connection negotiation.

From the datasheet of Texas Instruments TUSB501, after power up, the TUSB501 device periodically performs receiver detection on the Tx pair. If it detects a SuperSpeed USB receiver, it enables Rx termination, and the TUSB501 is ready to redrive.

Thus, when the FX3 device is connected to the re-driver, the re-driver detects FX3 as a receiver and enables its terminations. Similarly, FX3 also turns on its USB 3.0 PHY and starts USB 3.0 receiver detection. Because the re-driver is active all the time, FX3 detects the re-driver. If the re-driver is connected to the host using USB 2.0 cables, the FX3 device will wait for USB 3.0 enumeration packets indefinitely and does not fall back to USB 2.0 mode. Because of this, the device will neither enumerate in USB 3.0 nor in USB 2.0 mode. This is an expected behavior according to Section 6.8 - USB 3.0 and USB 2.0 Function Coordination of the FX3 TRM because receiver detection was successful.

Do the following to try USB 3.0 enumeration and to fall back to USB 2.0 enumeration if it fails:

1. Declare a timer structure (CyU3PTimer) globally. See the FX3 API guide for more details.

2. Create a timer using CyU3PTimerCreate(). This API can be called immediately after calling CyU3PConnectState(CyTrue, CyTrue) for USB 3.0 enumeration. Set the last parameter (timerOption) of CyU3PTimerCreate() to CYU3P_AUTO_ACTIVATE to start the timer immediately; if not, start the timer by using CyU3PTimerStart(). See FX3 API guide for more details on these APIs.

The default value of one timer tick is 1 ms. The timeout while creating the timer should be sufficient to ensure that USB 3.0 enumeration happens without errors.

3. Check whether the CY_U3P_USB_EVENT_SETCONF event is received before the timer expires. The successful reception of CY_U3P_USB_EVENT_SETCONF before the timer expiry indicates that the USB 3 enumeration was successful. In this case, when CY_U3P_USB_EVENT_SETCONF event is received, stop the timer using CyU3PTimerStop().

4. If the CY_U3P_USB_EVENT_SETCONF event is not received before the timer expires, the callback function that was provided while calling CyU3PTimerCreate() will be executed. This means that USB 3 enumeration was not successful. Therefore, inside the callback function, do the following to enumerate the device in USB 2.0 mode:

a. Disable the USB connection by using CyU3PConnectState(CyFalse, CyTrue);.

b. Provide a small delay by using CyU3PThreadSleep (100);.

c. Attempt USB 2.0 enumeration by using CyU3PConnectState (CyTrue, CyFalse);.

The firmware that comes along with AN75779 – How to Implement an Image Sensor Interface Using EZ-USB FX3 in a USB Video Class (UVC) Fra... can be used as a reference for implementing timer operations.