How can I return from k_sleep (or any other "sleep" method) when an interrupt occurs?
I would like my device to sleep (low power) until a GPIO pin toggles, then wakeup to process the event.
How can I return from k_sleep (or any other "sleep" method) when an interrupt occurs?
I would like my device to sleep (low power) until a GPIO pin toggles, then wakeup to process the event.
I'm currently busy looking at the "zephyr\samples\boards\nrf\system_off" sample (https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/boards/nordic/system_off/src/main.c), which looks like it may be the correct solution for my case.
I'm currently busy looking at the "zephyr\samples\boards\nrf\system_off" sample (https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/boards/nordic/system_off/src/main.c), which looks like it may be the correct solution for my case.
The system off sample is a good start for the use case. Hope it helps. Do let us know in case of further queries regarding the issue.
-Priyanka