Commit Graph

63 Commits

Author SHA1 Message Date
Jeff Epler
621953c960
Additional missing-prototypes fixes
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -06:00
Jeff Epler
d38cf05e59 samd51: Add watchdog timer 2021-10-19 10:52:14 -05:00
EmergReanimator
e636db713f Lose dependency to USB via CIRCUITPY_USB define for atmel port. 2021-10-04 10:57:39 +02:00
Scott Shawcroft
ca2cb9af2b
Remove MICROPY_PORT_* macros used for never reset
Now we use never_reset which is generally more correct and easier
to get right.

Fixes #5001 and fixes #4997
2021-07-15 16:20:04 -07:00
root
bc34403d71 Removed all references to MICROCONTROLLER_VOLTAGE_DISABLE 2021-06-09 10:46:14 -05:00
root
b2dea8ae0d Fix for issue #3383 - SAMD51 microcontroller.cpu.voltage 2021-06-05 16:17:14 -05:00
Scott Shawcroft
1a0b4193b7
Simplify the status LED to save power
This also removes the need to pin share because we don't use the
status LED while user code is running.

The status flashes fallback to the HW_STATUS LED if no RGB LED is
present. Each status has a unique blink pattern as well.

One caveat is the REPL state. In order to not pin share, we set the
RGB color once. PWM and single color will be shutoff immediately but
DotStars and NeoPixels will hold the color until the user overrides
it.

Fixes #4133
2021-05-13 14:41:20 -07:00
Dan Halbert
9ca0e689a5
Merge branch 'main' into wio_add_pin_assign 2021-05-03 09:33:18 -04:00
Jeff Epler
dfa7c3d32d codeformat: Fix handling of **
After discussing with danh, I noticed that `a/**/b` would not match `a/b`.

After correcting this and re-running "pre-commit run --all", additional
files were reindented, including the codeformat script itself.
2021-04-30 15:30:13 -05:00
Tsutomu IKEGAMI
0d25b95f0d Add definitions of PB2[4-9] pins to microcontroller.pin for atmel-samd. 2021-04-29 02:19:34 +09:00
microDev
dc332baa87
update common_hal_reset_pin() 2020-12-28 20:04:00 +05:30
Dan Halbert
8b7c23c1ee address review comments 2020-12-01 20:01:14 -05:00
Dan Halbert
104a089677 deep sleep working; deep sleep delay when connected 2020-11-26 22:06:37 -05:00
Dan Halbert
a0f1ec3c4a wip 2020-11-22 19:10:09 -05:00
Dan Halbert
75559f35cc wip: ResetReason to microcontroller.cpu 2020-11-21 23:29:52 -05:00
microDev
930cf14dce
Add check for invalid io, function to disable all alarms 2020-10-27 16:17:26 -07:00
microDev
e35938971a
Add description of alarm modules 2020-10-27 16:16:55 -07:00
Jeff Epler
eb0b023dee samd: extend IGNORE_PIN_foo to all sam e5x/e5x pins 2020-10-17 20:08:32 -05:00
Jeff Epler
aa3c890ead samd: pin: Fix 'undefined reference to pin_PA30'
.. when PA30 is IGNOREd
2020-10-17 20:08:32 -05:00
Jeff Epler
183649aad8 samd: move mcu_find_pin_function to header
.. it'll be used in can as well as sdio
2020-09-21 16:44:07 -05:00
Jeff Epler
1b29ceaf1a sam e54: disable microcontroller.cpu.voltage
This hangs, and the usual workarounds didn't work.
2020-09-17 18:27:43 -05:00
root
2690faec43 Moved checks for invalid pin to common-hal/microcontroller/Pin.c 2020-09-05 11:42:06 -05:00
Jeff Epler
da733c01da atmel-samd: Add support for SAM E54 family MCUs
This introduces the new macro SAM_D5X_E5X.  This is mostly the same
as SAMD51 before, except in a few places where a special case for
SAME54 is required
2020-06-23 10:41:48 -05:00
Scott Shawcroft
54b66d9484
Merge pull request #3052 from dhalbert/samd51-voltage-check-delay
delay 1ms on SAMD51 when reading processor voltage
2020-06-22 14:29:43 -07:00
Jeff Epler
a770b5a919 never_reset_pin: Move pin validity check before first use of pin number 2020-06-22 10:45:27 -05:00
Dan Halbert
1687c8b1e3 delay 1ms on SAMD51 when reading processor voltage 2020-06-19 15:25:04 -04:00
Jeff Epler
09dc46a984 Add Protomatter and FramebufferDisplay 2020-04-14 18:24:54 -05:00
Dan Halbert
40434d6919 wip 2019-12-05 22:45:53 -05:00
Hierophect
81223c76bd revert error 2019-11-15 13:04:25 -05:00
Hierophect
2c6781f74d move neopixel_in_use flag to shared-bindings 2019-11-15 12:59:52 -05:00
Hierophect
de5691acf5 Add never_reset and reset to pin common hal, adjust files 2019-11-15 12:47:00 -05:00
Dan Halbert
7b79ac3739 Parameterize linker script 2019-10-20 23:50:12 -04:00
Dan Halbert
c1ab2486f9 return chip vcc value 2019-10-12 15:42:15 -04:00
Scott Shawcroft
b87565138e
Rework safe mode so we can trigger on all resets 2019-05-09 10:15:28 -07:00
Scott Shawcroft
837d3f57ee
Update on_next_reset for new safe mode.
Fixes #1831
2019-05-08 15:23:40 -07:00
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