Force Link Training

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

cross mob
GuSc_293616
Level 3
Level 3
5 likes given First like given

Prelude:

Based on USB3.1 spec. ("State Diagram of the Link Training and Status State Machine") a link training is done before link power mode return to U0 from U1/U2. The SDK function CyU3PUsbSetLinkPowerState only allows the return to U0 mode, with the exception of the host requesting the switch to U1/U2 also U1/U2. If the device wants to change, this does not seem possible.

Another way is "Error, Directed", which can be observed via the event CY_U3P_USB_EVENT_LNK_RECOVERY.

Problem:

In our case, if the USB3.1 cable is "bad" with about 40 phy errors / second regular link errors and CY_U3P_USB_EVENT_LNK_RECOVERY messages. After an indefinite time of 2-10h no link errors can be observed (according to CyU3PUsbGetErrorCounts), but still around 20 phy errors / second. Therefore CYU3P_USBEP_SS_RESET_EVT occur frequently, so that the data transfer has to be restarted. As long as the event (CYU3P_USBEP_SS_RESET_EVT) occurs less than once per second, the problem can be compensated by error handling. Afterwards, one cannot transfer any image data stream from our device any more. If you now perform a USB reconnect, the problem of the CYU3P_USBEP_SS_RESET_EVT events will be fixed.

USB-Reconnect:

CyU3PUsbLPMEnable();

CyU3PConnectState(CyFalse, CyTrue);

CyU3PThreadSleep(25);

CyU3PConnectState(CyTrue, CyTrue);

CyU3PUsbLPMDisable();

The assumption is that the USB reconnect solves the problem temporarily through its link training.

Is there any way to force a link training by device, only to be sure it's a missing link training is the problem?

Information:

We use SDK 1.3.3 and also testet with SDK 1.3.4 but this seems less stable than the old one.

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

Hello Heiko,

I have modified the Fx3AppGcc (second stage boot loader) firmware to set the tx swing to 120  and I have added a vendor command  (0x99) in the application firmware to read this register to check whether the register is set with that value or not.

Also, the boot loader settings are such that there will not be re enumeration (on programming with application firmware)

The application firmware that i am using is bulksrcsink.

Please refer to the attachments.

Please let me know if this helps

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
16 Replies