Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
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?