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

esb stops after APP_USBD_EVT_POWER_REMOVED

I have the nRF52840 DK running a USB HID and an ESB PTX.

It is sending sensor data to a PRX continuously, with ACK.

The end product will be a power-sensitive device, so I figured enabling APP_USBD_CONFIG_POWER_EVENTS_PROCESS would reduce power consumption be turning the USB device off when not required.

The HID is configured like this:

APP_USBD_CONFIG_SELF_POWERED 1
APP_USBD_CONFIG_POWER_EVENTS_PROCESS 1

When the USB cable is inserted, the board enumerates correctly, and functions fine as the HID, and the ESB transmission continues.

However, when the USB cable is removed and app_usbd_stop() is called, the ESB transmission stops.

I'm guessing that a clock somewhere has stopped.

Any suggestions on the best way to keep ESB going after the USB disconnect?

Related