I work on a SOM from Toradex, based on VF61 SoC.
I'm trying to investigate the built in charger detection mechanism in the Vybrid SoC, so I downloaded the reference manual (VFXXXRM Rev. 0, 10/2016)
I did some tests, both with a dedicated wall charger and with a host charger, but I can't understand completely how registers USB_ANALOG_USB0_CHRG_DETECT and USB_ANALOG_USB0_CHRG_DETECT_STATUS.
If I set FORCE_DETECT bit in the USB_ANALOG_USB0_CHRG_DETECT register I'm able to distinguish three different conditions from USB_ANALOG_USB0_CHRG_DETECT_STATUS register:
nothing is connected to USB: PLUG_CONTACT = CHRG_DETECTED = DM_STATE = DP_STATE = 1 (all the 4 bits to 1)
a dedicated charger is connected: PLUG_CONTACT = 0 CHRG_DETECTED = DM_STATE = DP_STATE = 1 (three bits to 1 and one bit to 0)
a host device (my laptop): PLUG_CONTACT = DM_STATE = DP_STATE = 0 CHRG_DETECTED = 1(three bits to 0 and one bit to 1)
Some questions came out:
how does bit CHRG_DET_STATUS in USB_ANALOG_USB0_CHRG_DETECT register works? This is a read-only bit, but it's always zero (even if the charger is conneted).
Hi Vix,
You could take a look at Chapter 14 “USB Device Charger Detection (USBDCD) Module” of the “Kinetis Peripheral Module Quick Reference” document, as a reference:
http://www.nxp.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf
Hope this will be useful for you.
Best regards!
/Carlos
Hi Carlos,
the content of Chapter 14 “USB Device Charger Detection (USBDCD) Module” of the “Kinetis Peripheral Module Quick Reference” is not so useful, because it refers to a different platform and the registers and bit definition is quite different.
The first paragraphs of chapter 14 clarify a little bit the USB charger specification, but they're almost clear.
My problem is what I see in VF61 registers when different USB chargers are connected; this seems a little bit different from what written in VFxx reference manual.