FX3 (CYUSB3014) Charger Detection

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

cross mob
AaTa_3198991
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?

0 Likes
1 Solution
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello,


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.


Regards,

Yashwant

View solution in original post

0 Likes
2 Replies
AaTa_3198991
Level 1
Level 1

More info: The chip for some reason decided to become OTG 1.3 A-Device. ACA_ENABLE is set to 1 and OTG ID is 001.

Comment for 001 says 'OTG 1.3 A-Device (RID_FLOAT_CHG > 220kΩ)'. The comment seems to be backwards, every web site says floating ID pin is for B-devices.

Also, comment for bit pattern '000' is 'OTG 1.3 B-Device (RID_GND: 0...1kΩ)' which suggests that ID pin needs to be grounded for B-device, which again seems to be backwards to everything else.

In my gadget FX3 pin OTG_ID is floating so FX3 should become a B-device. How can I force the device to be a B-device, OTG or not?

0 Likes
YashwantK_46
Moderator
Moderator
Moderator
100 solutions authored 50 solutions authored 50 likes received

Hello,


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.


Regards,

Yashwant

0 Likes