Commit Graph

5 Commits

Author SHA1 Message Date
Scott Shawcroft 266be30777 atmel-samd: Introduce a nvm module for non-volatile byte-level memory access. (#203)
* atmel-samd: Introduce a nvm module for non-volatile byte-level memory access.

This allows for persisting small configuration values even when the file system
is read-only from CircuitPython.

Fixes #160

* Review feedback:
* Add tests.
* Fix non-zero index.
* Fix len()
2017-08-25 16:00:27 -04:00
Scott Shawcroft ae715a827b atmel-samd: Rework the clock configs to only be crystalless when needed by the hardware. 2017-02-10 05:09:17 -08:00
Scott Shawcroft e3f9ee839a Add frequency changing support to PWMOut.
You can either set it once up front, or set variable_frequency on custruction to
indicate that the frequency must be able to change. This informs whether a timer
can be shared amongst pins.

This also adds persistent clock calibration on atmel-samd. Once the device has
synced its clock frequency over USB it will remember that config value until USB
is used again. This helps ensure the clock frequency is similar on and off USB.

Lastly, this also corrects time.sleep() when on USB by correcting the tick counter.
2017-01-30 15:02:01 -08:00
Scott Shawcroft bb1822faea atmel-samd: Support external flash on the Metro M0 w/Flash.
This uses a scratch flash sector to save data before writing a full sector.
2016-10-21 15:44:09 -07:00
Scott Shawcroft a6254f4344 atmel-samd: Add basic support for experimental Metro M0 with an external flash chip. 2016-10-07 15:09:01 -07:00