Commit Graph

7 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 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 853e5fc652 atmel-samd: Ensure at least 2k is left for the stack. 2016-10-21 15:43:24 -07:00
Scott Shawcroft 09be96a6aa atmel/samd: Add filesystem support. 64k is stored in flash. 2016-09-02 17:00:30 -07:00
Scott Shawcroft 0c4f9b878a Enable REPL over USB.
All of the code was there except the linker was failing to clear the bss section because I added too many .zeros. The should have only been the exported globals that start with _ like _szero = .. Fixing that and turn on the usb transmit fixed everything.
2016-08-24 00:14:11 -07:00
Scott Shawcroft 9485634d41 Add support for REPL on Arduino Zero through EDBG via UART. 2016-08-23 16:47:53 -07:00
Scott Shawcroft 8f26d181c3 Blinking the LED works. Clocks should be set up correctly.
Everything works fine without USB being plugged in but faults (I think) when USB is plugged in. This is switched away from the USB code from the bootloader onto the USB code thats generated by Atmel Studio using the high level classes from ASF.
2016-08-22 23:53:11 -07:00