[riot-notifications] [RIOT-OS/RIOT] cpu/sam0_common: GPIO: use tamper detection to wake from Deep Sleep (#14030)

benpicco 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:

  https://github.com/RIOT-OS/RIOT/pull/14030

-- 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 --

https://github.com/RIOT-OS/RIOT/pull/14030.patch
https://github.com/RIOT-OS/RIOT/pull/14030.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14030
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200505/1c9e676e/attachment-0001.htm>


More information about the notifications mailing list