circuitpython/ports/atmel-samd
Scott Shawcroft 40118bcf57
Add board_deinit for use with sleep
This changes lots of files to unify `board.h` across ports. It adds
`board_deinit` when CIRCUITPY_ALARM is set. `main.c` uses it to
deinit the board before deep sleeping (even when pretending.)

Deep sleep is now a two step process for the port. First, the
port should prepare to deep sleep based on the given alarms. It
should set alarms for both deep and pretend sleep. In particular,
the pretend versions should be set immediately so that we don't
miss an alarm as we shutdown. These alarms should also wake from
`port_idle_until_interrupt` which is used when pretending to deep
sleep.

Second, when real deep sleeping, `alarm_enter_deep_sleep` is called.
The port should set any alarms it didn't during prepare based on
data it saved internally during prepare.

ESP32-S2 sleep is a bit reorganized to locate more logic with
TimeAlarm. This will help it scale to more alarm types.

Fixes #3786
2020-12-08 10:52:25 -08:00
..
asf4@84f56af132 update submodules to merge commits 2020-09-14 17:22:30 -05:00
asf4_conf Add CAN to SAM E51 clock config 2020-09-21 16:44:26 -05:00
bindings/samd Fix several type hints 2020-07-27 18:05:13 +09:00
boards Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
common-hal Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
freetouch@b6859a349e Use merged in FreeTouch 2018-05-23 11:57:35 -07:00
modules Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00
peripherals@a7e39c4d01 samd: Update peripherals submodule 2020-10-17 20:08:32 -05:00
sd_mmc samd: sdio: Add needed files from atmel start 2020-06-26 11:50:41 -05:00
supervisor Add board_deinit for use with sleep 2020-12-08 10:52:25 -08:00
tools _canio: Minimal implementation for SAM E5x MCUs 2020-09-21 16:44:26 -05:00
.gitattributes Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00
.gitignore Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00
audio_dma.c samd: audio: Move to background callback 2020-07-15 09:26:47 -05:00
audio_dma.h samd: audio: Move to background callback 2020-07-15 09:26:47 -05:00
background.c supervisor: factor supervisor_background_tasks from sundry ports 2020-07-15 11:49:44 -05:00
background.h supervisor: factor supervisor_background_tasks from sundry ports 2020-07-15 11:49:44 -05:00
eic_handler.c refactor countio based on feedback 2020-05-05 15:23:38 +10:00
eic_handler.h refactor countio based on feedback 2020-05-05 15:23:38 +10:00
fatfs_port.c Add license to some obvious files. 2020-07-06 19:16:25 +01:00
ld_defines.c wip 2019-12-05 22:45:53 -05:00
Makefile Merge pull request #3529 from jensechu/color-converter-transparency 2020-10-20 10:41:57 -07:00
mpconfigport.h Disable complex arithmetic on SAMD21 builds to make space 2020-11-29 15:34:38 -05:00
mpconfigport.mk Disable 3-arg pow() function on m0 boards 2020-11-24 16:54:33 -06:00
mphalport.c atmel-samd: Add support for SAM E54 family MCUs 2020-06-23 10:41:48 -05:00
mphalport.h Add externs. GCC10 complains about duplicate defines 2020-07-22 16:26:46 -07:00
qstrdefsport.h Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge 2017-10-24 22:31:16 -07:00
README.rst docs: Improve 5.0.x <-> main branch doc linkrot 2020-06-14 11:12:35 -05:00
reset.c Add some NORETURN attributes 2020-09-28 18:55:56 -05:00
reset.h Add some NORETURN attributes 2020-09-28 18:55:56 -05:00
samd_peripherals_config.h Move pin struct to the peripherals library. 2018-08-02 13:59:05 -07:00
timer_handler.c _pew: move to common-hal 2020-06-22 10:45:27 -05:00
timer_handler.h Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-20 18:25:13 -07:00

SAMD21 and SAMD51
==================

This port supports many development boards that utilize SAMD21 and SAMD51 chips. See
https://circuitpython.org/downloads for all supported boards.


Building
--------

For build instructions see this guide: https://learn.adafruit.com/building-circuitpython/


Debugging
---------

For debugging instructions see this guide: https://learn.adafruit.com/debugging-the-samd21-with-gdb


Port Specific modules
---------------------

.. toctree::
    ../../shared-bindings/samd/index