Commit Graph

29 Commits

Author SHA1 Message Date
Stewart a41272dcd3 atmel-samd: Added missing adalogger pins (#461)
- Added D4 and moved associated SD_CS so that they are paired within list
- Added D7 and SD_CD which is the SD Card Detect pin
- Added D8 and GREEN_LED
- Added RED_LED associated with D13
- Added Setup information regarding arm complier packages
2017-11-26 21:08:27 -08:00
Dan Halbert 274fff4226 Use internal libm for all atmel-samd boards. 2017-10-16 12:20:33 -07:00
Dan Halbert dbd3f15168 1. Use lib/libm for small (non-Express builds) to gain back a lot of flash space.
2. Add flag INTERNAL_LIBM to mpconfigboard.mk files to signal using lib/libm.
3. Fix floating-point warnings in lib/libm
4. Turn off -finline-limit, no longer needed due to 1.
5. Add explicit flags for SPI_FLASH_FILESYSTEM and INTERNAL_FLASH_FILESYSTEM
to mpconfigboard.mk files, so they don't need to know the name of the .c file
that implements those. Makefile takes care of checking the flags and including
the right files.
2017-10-16 12:20:33 -07:00
Dan Halbert c679c80c71 Modernize module and class static dicts; update freetouch 2017-08-27 15:02:50 -04:00
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 3660023046 atmel-samd: Update README and add pinout tables that map MCU names
to names in the board module and explain pin capabilities.

Fixes #149
2017-07-13 16:05:24 -07:00
Scott Shawcroft 1e04e8ea1c atmel-samd: Reboot to bootloader when a 1200 baud serial connection is
closed. This is how Arduino triggers the bootloader.
2017-07-12 11:58:22 -07:00
Scott Shawcroft a715bf6bac atmel-samd: Introduce board reset mechanic used on CircuitPlayground
Express to ensure the Neopixels are off after reloads.
2017-06-16 15:40:15 -07:00
Scott Shawcroft 3e23464b1e atmel-samd: Add user initiated safe mode and rework board.c for
board specific functionality.

Fixes #155
2017-06-16 14:55:53 -07:00
Scott Shawcroft 7672bf7736 atmel-samd: Rename auto-reset to auto-reload to reduce confusion with physical reset buttons. 2017-05-12 16:45:38 -07:00
Scott Shawcroft 8d0d5defc7 atmel-samd: Use LTO for all builds to get 5000 bytes back on express boards. 2017-04-18 09:44:04 -07:00
Scott Shawcroft d598c2a919 atmel-samd: Add USB HID mouse and keyboard support. 2017-02-27 15:43:58 +01:00
Scott Shawcroft 062fac1d43 atmel-samd: Use link time optimization to reduce code size of builds which
share space with the file system.

"Express" builds with SPI flash crash the compiler for some reason so its
currently disabled for them.
2017-02-26 01:00:33 +01: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 370d1dec88 SPI tweaks for SD Cards:
* Always init SPI to 250k to start for SD cards.
* Add ability to configure byte written during read.
* Add ability to read and write to portions of buffers like existing I2C API.
2017-02-10 05:09:17 -08:00
Scott Shawcroft f6cf8ae208 atmel-samd: Split UART pin names into two so that all names start
with a letter and are therefore valid Python.

Fixes #73.
2017-01-12 13:53:47 -08:00
Scott Shawcroft 0ae344841f atmel-samd & esp8266: Make sure pins are not already in use.
This prevents corrupting previous functional objects by stealing their pins
out from under them. It prevents this by ensuring that pins are in default
state before claiming them. It also verifies pins are released correctly and
reset on soft reset.

Fixes #4, instantiating a second class will fail.
Fixes #29, pins are now reset too.
2016-12-07 15:21:14 -08:00
Scott Shawcroft f4a1da4be9 atmel-samd: Only include bitbangio on boards with flash. 2016-12-01 13:46:44 -08:00
Scott Shawcroft 2d9a0c76c5 atmel-samd: Switch to MICROPY_PORT_ROOT_POINTERS for the flash cache. 2016-11-29 14:29:33 -08:00
Scott Shawcroft cc412a80ad atmel-samd: Support Trinket and Gemma M0 prototypes. 2016-11-22 12:03:42 -08:00
Scott Shawcroft ccbb5e84f9 This introduces an alternative hardware API called nativeio structured around different functions that are typically accelerated by native hardware. Its not meant to reflect the structure of the hardware.
Docs are here: http://tannewt-micropython.readthedocs.io/en/microcontroller/

It differs from upstream's machine in the following ways:

* Python API is identical across ports due to code structure. (Lives in shared-bindings)
* Focuses on abstracting common functionality (AnalogIn) and not representing structure (ADC).
* Documentation lives with code making it easy to ensure they match.
* Pin is split into references (board.D13 and microcontroller.pin.PA17) and functionality (DigitalInOut).
* All nativeio classes claim underlying hardware resources when inited on construction, support Context Managers (aka with statements) and have deinit methods which release the claimed hardware.
* All constructors take pin references rather than peripheral ids. Its up to the implementation to find hardware or throw and exception.
2016-11-21 14:11:52 -08:00
Scott Shawcroft f42b41e1e9 atmel-samd: Increase autoreset delay to reduce duplicate resets. 2016-10-31 11:31:33 -07:00
Scott Shawcroft 5b3a143ffe atmel-samd: Rework tick timer to use TC5 and support neopixel status LED.
The tick timer needed to be reworked because the ASF delay functions also
use the SysTick timer. Now, it uses TC5 and calls out to the autoreset
logic every tick. Fixes #43.

Added neopixel status colors and corrected the latch time from ms to us.
Fixes #42.
2016-10-28 20:16:39 -07:00
Scott Shawcroft 2098515f6a atmel-samd: Rework pin definitions to share most of the data structures and included based on ASF defines. 2016-10-26 17:57:47 -07:00
Scott Shawcroft 34fa81eaf3 atmel-samd: Hook in DTR for more ports and make the serial TX more resiliant to long strings. 2016-10-26 13:32:41 -07:00
Scott Shawcroft d189a3f3cf atmel-samd: Support auto-reset based on USB write activity.
It will soft-reboot micropython after a burst of writes to the
file system. This means that after you save files on your computer
they will be automatically rerun.

This can be disabled in the build by unsetting AUTORESET_TIMER in
mpconfigboard.h.

Using the REPL will also prevent the soft resets until you reset
with CTRL-D manually.
2016-10-25 18:36:37 -07:00
Scott Shawcroft d05299f57a atmel-samd: Add D13 led as mass storage write indicator. 2016-10-25 15:06:05 -07:00
Scott Shawcroft 16584dfee6 atmel-samd: Fix the Feather builds by switching to the VFS mass storage implementation. 2016-10-24 12:42:09 -07:00
Sebastian Plamauer 9b1170a65d [atmel-samd] add adalogger board definitions 2016-10-19 10:02:01 +02:00