This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How do I get the nRF52840 to enumerate as a "bus powered" USB device, to then be allowed to draw 500mA from a PC's USB port.

I have a nRF52840 based product prototype which includes a power management integrated chip (PMIC) and a Li-Po battery.

The product recharges via a USB connector. The USB data lines from this connector are connected to both the PMIC and the nRF52840.

If the product is plugged into a dedicated USB charger, the PMIC will detect the short-circuit between the USB data lines and will start fast-charging the LiPo battery at 500mA.

If the product is plugged into a PC's USB port, the PMIC will detect this and will default to start charging the Li-Po battery at 100mA.

However, this 100mA charge rate should then be overridden (to 500mA) by a command from the nRF52840 to the PMIC if the nRF52840 does USB enumeration with the PC and successfully negotiates with the PC that the nRF52840 is a "bus powered" device that needs 500mA.

My question is how exactly do I go about programming the nRF52840 to USB-enumerate with a PC, and then negotiate this "bus powered" status.
Thank you.

Parents
  • To aid the discussion, here is what I believe is the sequence of messages between the nRF52840 and the PC required to negotiate the power level. (as taken from the USB PD Specification Revision2.0 )
    However, this is very low-level, and I have no idea about how to actually go about implement this in practice, using the nRF52840 SDK's libraries and/or driver code.

Reply
  • To aid the discussion, here is what I believe is the sequence of messages between the nRF52840 and the PC required to negotiate the power level. (as taken from the USB PD Specification Revision2.0 )
    However, this is very low-level, and I have no idea about how to actually go about implement this in practice, using the nRF52840 SDK's libraries and/or driver code.

Children
No Data