[riot-notifications] [RIOT-OS/RIOT] cpu/sam0_common: GPIO: use tamper detection to wake from Deep Sleep (#14030)
notifications at github.com
Wed May 6 01:17:55 CEST 2020
### Contribution description
On `samd5x` only the RTC can wake the CPU from Deep Sleep (`pm` modes 0 & 1).
The external interrupt controller is disabled, but we can use the tamper detection of the RTC.
If an gpio interrupt is configured on one of the five tamper detect pins, those can be used to wake the CPU from Deep Sleep / Hibernate.
### Testing procedure
Run `tests/periph_pm`. You will have to set `BTN0_PIN` to one of the RTC pins and connect a wire that you can pull high or low.
You should see the `BTN0 pressed.` message when an interrupt is triggered.
Now enter Deep Sleep with `pm set 0`.
The CPU should now reset when an event on the RTC GPIO happens.
### Issues/PRs references
Examples: Fixes #1234. See also #5678. Depends on PR #9876.
Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* cpu/sam0_common: GPIO: use tamper detection to wake from Deep Sleep
-- File Changes --
M cpu/sam0_common/periph/gpio.c (91)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications