Commit Graph

28 Commits

Author SHA1 Message Date
Scott Shawcroft ff7e729032
Fix custom pin in use logic for SWD
This should allow you to use SWD pins unless a debugger is attached.
You may have trouble connecting to SWD when CircuitPython has already
begun using them.

Fixes #1633
2019-03-14 11:11:35 -07:00
Scott Shawcroft 84292ad890
External fourwire works and blinka splash after 2019-01-17 00:20:16 -08:00
Scott Shawcroft 05d8885a1a
Rework displays in prep for dynamic support and 8bit parallel. 2019-01-16 12:05:20 -08:00
Scott Shawcroft 19db886645
Support the display on the pyportal.
Also fix #1390, reload during sleep broken.
2019-01-10 17:29:34 -08:00
Scott Shawcroft 43f7ca7985
Incorporate feedback:
* Clean up board defines.
* Add flush on eject and stay ejected.
* Swith back to NONE protocol for CDC.
2018-11-09 11:33:56 -08:00
Scott Shawcroft 9d91111b1b
Move atmel-samd to tinyusb and support nRF flash.
This started while adding USB MIDI support (and descriptor support is
in this change.) When seeing that I'd have to implement the MIDI class
logic twice, once for atmel-samd and once for nrf, I decided to refactor
the USB stack so its shared across ports. This has led to a number of
changes that remove items from the ports folder and move them into
supervisor.

Furthermore, we had external SPI flash support for nrf pending so I
factored out the connection between the usb stack and the flash API as
well. This PR also includes the QSPI support for nRF.
2018-11-08 17:25:30 -08:00
Dan Halbert 9ea809bef7 add pin claiming to devices 2018-08-31 18:38:05 -04:00
Scott Shawcroft 86d2154d71
Change file mode back. 2018-08-09 09:14:14 -07:00
Scott Shawcroft 94c5ceab36
Initial SAMR board revision. 2018-08-09 05:36:46 -07:00
Scott Shawcroft 933add6cd8
Support internationalisation. 2018-08-07 14:58:57 -07:00
Scott Shawcroft 168aa394db
Move pin struct to the peripherals library.
Its slimmed down by removing the qstr and bit packing TCC info.

The trinket m0 build actually grows by 20 bytes. The arduino zero
build shrinks by 188 bytes.
2018-08-02 13:59:05 -07:00
Scott Shawcroft a5e03b76a6 Split out the peripherals library in preparation of sharing with MakeCode. 2018-06-15 16:16:21 -07:00
Scott Shawcroft 2fbab8067a Prevent freezing USB during high frequency PulseIn.
We now track the last time the background task ran and bail on the
PulseIn if it starves the background work. In practice, this
happens after the numbers from pulsein are no longer accurate.

This also adjusts interrupt priorities so most are the lowest level
except for the tick and USB interrupts.

Fixes #516 and #876
2018-06-08 12:56:32 -07:00
Scott Shawcroft 9920f0a5de atmel-samd: Make ticks more atomic.
Always use current_tick when sub millisecond precision is required.
Otherwise getting the ms/us to correspond is tricky.
2018-06-01 15:08:52 -07:00
Scott Shawcroft fd71e56891 atmel-samd: Re-org helper peripheral files into their own subdirectory.
Ideally in the future they won't depend on ASF4 or MicroPython.
2018-06-01 15:07:31 -07:00
Roy Hooper 3fd9900ea7 disable pins on trinket_m0 so that we can free a fair bit of flash - Issue #840 2018-05-15 13:13:59 -04:00
Dan Halbert 3a2b4af830 Implement microcontroller.cpu.temperature on '21 and '51. 2018-05-01 21:35:55 -04:00
Scott Shawcroft 812fe0c93f Turn on nvm in 3.0.
Its 256b on M0 and 8k on M4 to match flash erase sizes.

Fixes #758
2018-04-13 16:22:28 -07:00
Jeff Epler fe6f5aaa70 atmel-samd: reset: reset() was always entering bootloader mode
.. set the dbl_tap word to a different special value unless
RUNMODE_BOOTLOADER was selected
2018-04-05 08:16:53 -05:00
Jeff Epler c0029e1d97 Don't lose half of the processor's serial number
Before this change, `microcontroller.cpu.uid` returned values
where the top 4 bits of each byte were zero, because of
an incorrect bitmask used in this function.
2018-03-25 13:01:04 -05:00
Scott Shawcroft 88aa0e2660 Remove SERCOM pointers from pin data structure because index is
enough.

This saves 380 bytes on the Arduino Zero build. (More pins ==
more savings.)
2018-03-14 11:14:32 -07:00
Scott Shawcroft 0398f308fa m4 compiles, pwmout implemented 2018-02-09 16:37:27 -08:00
Scott Shawcroft 190e7d629e WIP 2018-02-09 16:37:27 -08:00
sommersoft 44bc1711aa Added Unique ID Functions/Updated Support Matrix (#527)
shared_bindings/index.rst: updated Support Matrix format as discussed in PR #503 & Issue #448.

shared-bindings/microcontroller/Processor.c & .h: added UID lookup functionality for use with all ports. Fixes #462.
2018-01-18 11:39:11 -08:00
Dan Halbert 065e82015f merge from 2.2.0 + fix up board defs 2018-01-02 21:25:41 -05:00
Dan Halbert 7292984204 Implement busio.I2c.
* Added asf4_conf/samd*/hpl_sercom_config.h
* Adjusted clocks in peripheral_clk_config.h.
* Put some frozen libs back in CPX for testing.
* Implement common-hal I2C
* Add samd*_peripherals.h in parallel with samd*_pins.h for common
  functions and data.
* Store SERCOM index in pins table for convenience.
* Canonicalize some #include guard names in various .h files.

simpler reset of SERCOMs; remove unused routine
2017-11-07 09:59:54 -08:00
Scott Shawcroft c90a2d9b42 atmel-samd: Fix SAMD51 SWCLK reset so we can connect the JLink
while CircuitPython is running.
2017-11-02 14:00:38 -07:00
Scott Shawcroft 73c15dcf8b Merge commit 'f869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c' into nrf2_merge
This is prep for merging in the NRF5 pull request.
2017-10-24 22:31:16 -07:00