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

USB superspeed peripherals

Level 1
Level 1

I'm using custom hardware with FX3, using both USB 2 and USB 3. Both USB connections work, the device is recognized with either USB 2 or USB 3 cable.

I need to detect if the device is connected to USB 3 standard downstream port (without lightning next to the port) or to charging downstream port (with the lightning symbol). The extremely limited documentation about that feature says 'set bit 31 of the register CHGDET_CTRL at 0xE0031800 and watch bit 0'. I do set the top bit but bottom bit never turns on. There is no sample code for this feature anywhere in sight.

The bits are named CY_U3P_UIB_PHY_CHARGER_DETECT_EN (31) and CY_U3P_UIB_PHY_CHG_DETECTED (0) but the entire FX3 SDK has no references to the bits, they are only defined in a header file. The register where the bits are defined is referenced in some code but only related to USB OTG.

There is another register PHY_CLK_AND_TEST at 0xE0031008 that has 4 bits related to charger. For some bits descriptions say 'not tested', and these bits don't have any effect either.

Is it possible to get the feature to work? Is there sample code showing how the feature works?

1 Solution
Moderator 100 solutions authored 50 solutions authored 50 likes received


The detection of the type of port a FX3 is connected to, ie., standard downstream port, charging downstream port or dedicated downstream port, is not possible.

This is the reason why the battery charging section has been minimized from the latest datasheet of FX3.



View solution in original post

2 Replies