I'm using a custom battery operated board with the nRF52840, when there is no GPIO events for a specified time period, the device goes to a hibernate mode using the __WFE, to save battery power.
Im trying to figure out the best way to wakeup the device from low power mode when user connects a powered USB cable.
My thought is to disable the USB peripheral from sleeping while entering the low power mode and use nrf_drv_power_usbevt_init() to enable the interrupts on power events, and use that to wake up the device if the event == NRFX_POWER_USB_EVT_DETECTED.
Is it the ideal way? I believe this will work but increase the sleep power consumption, is there any better work arounds?
Thanks