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 Reply
  • Thanks, but I feel that this this jumps over several dozen steps.

    How do I even get started with using USB on this chip?

    What do I need to do to get to the point where I can call that function.
    Is the USB enumeration an automatic part of the chip, or do I need to do something to enable it, include libraries, configure particular settings, call initialisation routines, or what?
    Please can you walk me through the basic steps required by someone unfamiliar with this chip. Thank you.

Children
Related