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.
Hi Dane,
To wake up your device from a low power mode when a GPIO pin toggles, you can use the GPIO pin as an interrupt. Just set the GPIO pin that you wish to use, in order to trigger an interrupt when it is toggled.
https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_gpio_interface.html#:~:text=GPIO%20interrupt%20configuration%20flags
Regards,
Priyanka
Hi Dane,
To wake up your device from a low power mode when a GPIO pin toggles, you can use the GPIO pin as an interrupt. Just set the GPIO pin that you wish to use, in order to trigger an interrupt when it is toggled.
https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_gpio_interface.html#:~:text=GPIO%20interrupt%20configuration%20flags
Regards,
Priyanka