Hi Team,
I'm working on an application using the nRF5340, and I'm implementing a low power mode in which the system shuts down non-essential peripherals and aborts all active threads and timers. The goal is to reduce power consumption after 5 minutes of inactivity.
Requirement:
I would like the device to wake up from this low power mode when USB is connected (i.e., VBUS becomes active).
Here’s what I’ve observed:
-
According to the datasheet, VBUS is connected to pin B11.
-
I’m using nRF Connect SDK v2.5.2.
-
When I enter system off mode using
sys_poweroff(), the device wakes up when USB is connected, which is expected behavior. -
However, when I use my custom low power routine (which aborts threads, stops timers, and suspends peripherals), the device does not wake up on USB connect.
-
I’m currently unable to configure B11 (VBUS) as a GPIO wake-up source, likely because it’s tied internally to the USB regulator.
Questions:
-
Is there a recommended way to detect USB connection (VBUS rising edge) during low power or standby (not just in system off)?
-
Can B11 (VBUS) be configured as a wake-up source in low power mode?
-
Alternatively, is there a recommended GPIO (or circuit-level approach) to detect USB insertion and trigger wake-up from low power mode?
Any guidance on configuring this properly in Zephyr / nRF SDK v2.5.2 would be appreciated.
Thanks in advance,
Ilam