Commit Graph

3154 Commits

Author SHA1 Message Date
Scott Shawcroft 03b6f7b87b
Add commend about FreeRTOS stack canary 2020-05-18 17:28:13 -07:00
Scott Shawcroft 164628282d
Update TinyUSB and shorten USB task delay 2020-05-18 17:27:49 -07:00
Mark Olsson 007c92ee6a Enable showing the console on a debug uart 2020-05-19 02:02:52 +02:00
Scott Shawcroft cf690bd390
Merge remote-tracking branch 'adafruit/master' into esp32s2 2020-05-18 16:46:41 -07:00
Scott Shawcroft 32617d5f2f
Merge pull request #2925 from arturo182/imx-spi
mimxrt1010: Increase max SPI speed
2020-05-18 15:22:42 -07:00
Scott Shawcroft ebfc1f2599
Merge pull request #2926 from arturo182/imx-temperature-fix
mimxrt10xx: Fix cpu.temperature crash
2020-05-18 15:20:21 -07:00
Scott Shawcroft af68ddebef
Merge pull request #2924 from simmel-project/nrf-rtc-persist
NRF: Persist RTC offset across reboots
2020-05-18 15:06:42 -07:00
Scott Shawcroft 9811c1fe4b
Merge pull request #2896 from theacodes/add-bytearray-decode
Add bytearray.decode() for CPython compatibility
2020-05-18 14:38:45 -07:00
arturo182 058a73128c mimxrt10xx: Fix cpu.temperature crash
Fixes #2514
2020-05-18 22:30:50 +02:00
arturo182 f92d53eaab mimxrt1010: Increase max SPI speed 2020-05-18 22:07:38 +02:00
Sean Cross 9f7c26c60d nrf: port: call common_hal_rtc_init() during init
Call the new function to set the RTC, or reset it if the offset is not
valid.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-18 11:52:30 +08:00
Sean Cross 83680c41db nrf: rtc: persist rtc offset across reboots
Store the RTC value in the .uninitialized section, but make sure to
flank it with some known values.  That way we can determine if the RTC
value has been initialized, or if it's random uninitialized garbage.

As part of this, add a `common_hal_rtc_init()` routine to determine if
the value is correct, or reset it to 0 if it is not valid.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-18 11:52:27 +08:00
Sean Cross 3b5f5ddaa6 nrf: port: move saved word into .uninitialized section
Circuit Python supports saving a single word of data across reboots.
Previously, this data was placed immediately following the .bss.

However, this appeared to not work, as Circuit Python zeroes out the
heap when it starts up, and the heap begins immediately after the .bss.

Switch to using the new .uninitialized section in order to store this
word across resets.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-18 11:52:25 +08:00
Sean Cross 192bb155fa nrf: port: move the heap after .uninitialized
Previously, it was placed following .bss.  However, now that there is a
new section after .bss, the heap must be moved forward.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-18 11:52:20 +08:00
Sean Cross f002c784c0 nrf: linker: add a new .uninitialized section
This section immediately follows the .bss section, and is designed to
contain uninitialized variables that should persist across reboots.

The section is placed directly after .bss, under the theory that the
size of Circuit Python's .bss + .data is bigger than the bootloader's
.bss + .data, so there is less likely to be a conflict.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-18 11:52:17 +08:00
cyz 4f7b4241a2 add hiibot_bluefi 2020-05-18 09:42:37 +08:00
Dan Halbert e175a64036
disable rotaryio in CPX crickit 2020-05-15 20:35:12 -04:00
Scott Shawcroft a57da6b808
Add port_fixed_stack for more spresence 2020-05-15 17:22:41 -07:00
Scott Shawcroft 8edb8e87c8
Turn reverse methods off for trinket haxpress 2020-05-15 17:22:22 -07:00
Scott Shawcroft 86f865afe0
Turn reverse methods off for cpx_crickit 2020-05-15 16:42:22 -07:00
Scott Shawcroft 3c1469b0a5
Add port_fixed_stack for more builds 2020-05-15 16:22:33 -07:00
Scott Shawcroft 6aaab005c5
Initial ESP32S2 port.
Basic blinky works but doesn't check pins.
2020-05-15 15:36:16 -07:00
Dan Halbert a3ca9401b4
Shrink crickit build 2020-05-15 18:29:37 -04:00
Lucian Copeland 99538c2414 Implement pin claiming, pin reset, and pin protections 2020-05-15 15:16:51 -04:00
Scott Shawcroft 0d8bca92e2
Merge pull request #2810 from dherrada/master
Pyi integration
2020-05-15 10:31:05 -07:00
Scott Shawcroft db4dbe0752
Merge pull request #2889 from jepler/gamepad-tick
Gamepad, GamepadShift: Fix after lower-power by enabling supervisor tick
2020-05-13 11:53:23 -07:00
Jeff Epler adef45403b samd: audio dma: enable/disable supervisor tick as needed 2020-05-13 10:29:36 -05:00
Scott Shawcroft 7546d47f77
Merge remote-tracking branch 'adafruit/master' into improve_verification 2020-05-13 08:23:55 -07:00
Scott Shawcroft 80129c5a21
Disable countio on trinket haxpress 2020-05-12 18:55:49 -07:00
Scott Shawcroft cde6651721
Merge remote-tracking branch 'adafruit/master' into improve_verification 2020-05-12 18:23:59 -07:00
Scott Shawcroft 277e8d528b
Merge branch 'master' into Optical-Encoder-Module 2020-05-12 18:22:57 -07:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
warriorofwire 5a80f5e606 nerf vectorio on a ton of m0 and overcommitted m4 boards due to translation text size 2020-05-12 15:23:00 -07:00
Scott Shawcroft d274074f01
Merge remote-tracking branch 'adafruit/master' into vectorio 2020-05-12 12:29:05 -07:00
Scott Shawcroft bc40034a08
Merge branch 'master' into Optical-Encoder-Module 2020-05-12 12:12:51 -07:00
Scott Shawcroft f7303e6bd0
Merge pull request #2754 from maholli/non-standard-nvm
Add non-standard nvm to QSPI for external flash support
2020-05-12 11:56:33 -07:00
Daniel Pollard 62bdfb74e3 removed lib from catwan_usbstick - updated transalations overflowed 2020-05-12 16:40:23 +10:00
Daniel Pollard 5e5461e77e removed countio from catwan_usbstick build 2020-05-12 16:32:35 +10:00
Daniel Pollard ee2cb703c8 merged master 2020-05-12 14:41:28 +10:00
Sean Cross ffaeeda749 nrf: simmel: decrease flash filesystem size
The flash filesystem must be reduced in order to allow the current
build to fit.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross f7fcd43516 nrf: simmel: disable SPIM3
Disable the SPIM3 controller to avoid needing to dedicate 8 kB to
the SPIM3 block.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross 370fc7293a nrf: support disabling SPIM3
SPIM3 is faster than all other SPI blocks, and is capable of generating
a 32 MHz clock.  However, it cannot be used at the same time as the BLE
radio without dedicating an additional 8 kB of RAM to it.

Therefore, some boards may want to disable this.  Support pre-defining
NRFX_SPIM3_ENABLED on the command line to disable it on some bords.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross 79c055f958 nrf: simmel: enable aesio
This adds AES support to simmel.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross 235098efb8 nrf: simmel: correct CSn pin
The CSn pin is pin 6 on bank 1, not bank 0.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Scott Shawcroft 62b835ad76
Merge pull request #2833 from xiongyihui/pitaya-go
add nRF52840 based Makerdiary Pitaya Go
2020-05-11 16:34:27 -07:00
Scott Shawcroft 4937d5f1ca
Merge pull request #2866 from hierophect/stm32-lsetimeout
STM32: Fix LSE hang at startup
2020-05-11 16:23:09 -07:00
Scott Shawcroft 55f78bfb70
Merge pull request #2878 from WarriorOfWire/ujson-stream-protocol
ujson: work with mp stream protocol for fast & easy read
2020-05-11 15:40:27 -07:00
Scott Shawcroft 801d9655e5
Merge pull request #2881 from DavePutz/Issue2872
Added call to rtc_reset() to fix Issue #2872
2020-05-11 15:30:32 -07:00
Lucian Copeland 94949fb46f Add recovery domain write access, adjust stack 2020-05-11 18:02:40 -04:00
Scott Shawcroft 61450cbd56
Add Teensy 4.1 board definition 2020-05-11 13:58:58 -07:00
Lucian Copeland 248704b262 Merge remote-tracking branch 'upstream/master' into stm32-lsetimeout 2020-05-11 14:18:37 -04:00
DavePutz 407938bf3a
Added a check for platforms supporting RTC before calling rtc_reset()
Added an #if CIRCUITPY_RTC check  for platforms supporting RTC
2020-05-11 12:03:44 -05:00
DavePutz 2ddfab315c
Added call to rtc_reset() in rtc_init()
Fix for issue #2872. The rtc_time_source had not been initialized; causing a time.time() call to fail.
2020-05-11 11:31:18 -05:00
warriorofwire eb3d5fa453 ujson: do not eat trailing whitespace
Ujson should only worry about whitespace before JSON.  This becomes apparent when you are using MP stream protocol to read directly from input buffers.

When you attempt to read(1) on a UART (and possibly other protocols) you have to wait for either the byte or the timeout.

Fixes:
- Waiting for a timeout after you have completed reading a correct and complete JSON off the input.
- Raising an OSError after reading a correct and complete JSON off the input.
- Eating more data than semantically owned off the input buffer.
- Blocking to start parsing JSON until the entire JSON body has been loaded into a potentially large, contiguous Python object.

Code you would write before:
```
line = board_busio_uart_port.read_line()
json_dict = json.loads(line)
```
or reaching for fixed buffers and swapping them around in Python.

Code that did not work before that does now:
```
json_dict = json.load(board_busio_uart_port)
```

- This removes the need for intermediate copies of data when reading JSON from micropython stream protocol inputs.
- It also increases total application speed by parsing JSON concurrently with receiving on boards that read from UART via DMA.
- It simplifies code that users write while improving their apps.
2020-05-10 20:45:42 -07:00
warriorofwire 206d0e598a Add vectorio: for drawing shapes
vectorio builds on m4 express feather

Concrete shapes are composed into a VectorShape which is put into a displayio Group for display.

VectorShape provides transpose and x/y positioning for shape implementations.

Included Shapes:

* Circle
  - A radius; Circle is positioned at its axis in the VectorShape.
  - You can freely modify the radius to grow and shrink the circle in-place.

* Polygon
  - An ordered list of points.
  - Beteween each successive point an edge is inferred.  A final edge closing the shape is inferred between the last
    point and the first point.
  - You can modify the points in a Polygon.  The points' coordinate system is relative to (0, 0) so if you'd like a
      top-center justified 10x20 rectangle you can do points [(-5, 0), (5, 0), (5, 20), (0, 20)] and your VectorShape
      x and y properties will position the rectangle relative to its top center point

* Rectangle
  A width and a height.
2020-05-09 15:38:22 -07:00
Max Holliday e6df8e0989 Merge branch 'master' into non-standard-nvm 2020-05-09 12:22:50 -07:00
Dan Halbert 8d00d99ca0
Shrink hallowing_m0_express to fit ko build 2020-05-08 22:51:21 -04:00
Lucian Copeland 5249a7b02c Add timeout and adjustment to LSI 2020-05-08 12:36:39 -04:00
Jeff Epler 182ae10080 Fix build after #2831 (stm32f4xx rgbmatrix) broke it 2020-05-07 18:32:50 -05:00
Scott Shawcroft c3b3eb4c21
Merge pull request #2831 from jepler/rgbmatrix-stm
stm: enable RGBMatrix
2020-05-06 08:35:25 -07:00
Scott Shawcroft 4519ddebeb
Merge pull request #2841 from hierophect/mimxrt-spi-oneway
mimxrt10xx: add one-directional SPI
2020-05-06 08:32:21 -07:00
Daniel Pollard 7f1be814c8 changed build variables as per advice 2020-05-06 09:04:15 +10:00
Lucian Copeland a1330747e8 text fixes, postpone warning disable 2020-05-05 12:46:30 -04:00
hierophect c311b5c002
Merge pull request #2842 from hierophect/stm32-h7-displayio
STM32: Add displayio to F7/H7
2020-05-05 12:37:08 -04:00
Daniel Pollard f63ee9fb9b excluded countio from other smaller boards 2020-05-05 16:15:57 +10:00
Daniel Pollard d5c24b99b8 hallowing m0 - exclude countio 2020-05-05 16:04:28 +10:00
Daniel Pollard bfa5cd9c13 refactor countio based on feedback 2020-05-05 15:23:38 +10:00
Dan Halbert b7836aeac6 address review comments 2020-05-04 19:51:08 -04:00
Dan Halbert bae7a5e433 make translate again 2020-05-04 17:26:59 -04:00
Dan Halbert 602eabe668
Squeeze hallowing_m0_express build slightly
ko build is a little too big.
2020-05-04 17:18:53 -04:00
Dan Halbert c377d4bea7
Merge branch 'master' into non-standard-nvm 2020-05-04 16:08:45 -04:00
Dan Halbert d6c6f9f4f0 add PacketBuffer .incoming_ and .outgoing_packet_length 2020-05-04 15:59:45 -04:00
Dan Halbert 4d7e341e44
Merge pull request #2844 from xobs/add-nrf-pca10100
nrf: add pca10100
2020-05-04 10:51:01 -04:00
Sean Cross b128399d1e nrf: simmel: enable CIRCUITPY_USB_HID
Simmel had USB HID disabled in order to save space.  However, the board
configuration did not set USB_DEVICES, causing it to inherit the default
device bouquet of MSC,CDC,MIDI,HID.  This in turn caused HID to be included
in the USB Configuration Descriptor.

For some reason, this was not a problem in an earlier version of tinyusb or
circuitpython.  However, in the most recent version this has rightfully
caused asserts to appear during configuration.

Re-enable USB_HID for now, as it doesn't add too much in terms of space.
We may disable it again later on if we become pressed for space.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-04 15:37:53 +08:00
Sean Cross cb4fc894d7 nrf: add pca10100
This is the nRF52833-DK board.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-04 15:07:49 +08:00
Lucian Copeland 61b0994631 Fix flag typo 2020-05-01 14:46:06 -04:00
Lucian Copeland bc581fbdfb Add-unidirectional-SPI 2020-05-01 13:15:38 -04:00
Yihui Xiong 7dd3ddc06b use Nordic's VID which seems to be allowed
https://devzone.nordicsemi.com/f/nordic-q-a/50638/usb-pid-for-nrf52840
2020-05-01 06:10:43 +00:00
Scott Shawcroft a863b0a349
Fix openmv_h7 build 2020-04-30 13:46:12 -07:00
Scott Shawcroft 1ca90572f1
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-30 13:25:31 -07:00
hierophect 10c5bf666e
Merge pull request #2836 from hierophect/stm32-openmv-pid
STM32: Add correct PID for the OpenMV
2020-04-30 16:07:34 -04:00
Lucian Copeland 06b62721b3 Increase H7 filesystem size 2020-04-30 15:49:17 -04:00
Scott Shawcroft 74a2d0944a
Merge pull request #2834 from Teknikio/fix/bluebird_pinout
Update teknikio bluebird pin assignments
2020-04-30 11:50:02 -07:00
Lucian Copeland 435aa3d055 Add correct PID for the OpenMV 2020-04-30 14:49:47 -04:00
Lucian Copeland 4f71bd295d Make PulseIO optional within DisplayIO 2020-04-30 14:47:50 -04:00
Scott Shawcroft f44e1d6a8d
Merge pull request #2828 from simmel-project/add-simmel
WIP: add simmel board
2020-04-30 11:40:34 -07:00
Lucian Copeland 89ff5589c4 Add the OpenMV-H7 R1 board 2020-04-30 12:39:20 -04:00
Jeff Epler e5be728c1c stm: enable protomatter
Testing performed: on stm32f405 feather, all pins change in plausible ways
on a logic probe.  Didn't actually drive a display yet.
2020-04-30 08:58:58 -05:00
JoeBakalor 36a71560c2 update teknikio bluebird pin assignments 2020-04-30 09:58:27 -04:00
Yihui Xiong 4393a88fb6 add nRF52840 based Makerdiary Pitaya Go 2020-04-30 07:38:20 +00:00
Dan Halbert 241d7e2ae6 change many ifndefs to ?= 2020-04-29 23:31:34 -04:00
Dan Halbert f3078511a6 further cleanup and bug fixing 2020-04-29 23:18:08 -04:00
Sean Cross 6aac9233db nrf: bluetooth: add s147 v7.0.1 softdevice hexfile
This was not added as part of the initial v7.0.1 patchset because
.hex files are in this project's .gitignore, and so git ignored it.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-30 10:43:46 +08:00
Dan Halbert 180f5c6a94 Merge remote-tracking branch 'adafruit/master' into ringbuf-fixes 2020-04-29 22:11:22 -04:00
Dan Halbert 3d62f87e29 back to '.packet_size' for compatiblity 2020-04-29 22:10:56 -04:00
Dan Halbert 84cee1ab8d rename and improve PacketBuffer packet length property 2020-04-29 17:49:31 -04:00
Scott Shawcroft 3799c34564
Disable bitbangio on CPX Crickit so we have room for lower_power.
Enable pixelbuf in its place because we'll need it soon.
2020-04-29 13:57:09 -07:00
Scott Shawcroft a30ff70b4e
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-29 10:51:21 -07:00
Sean Cross 1d0781bf12 nrf: add simmel board
This adds support for Simmel, an nRF52833-based bluetooth tracking
board designed to aid in pandemic tracing.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-29 11:40:00 +08:00
Scott Shawcroft 2d7cf4b792
Merge pull request #2819 from hierophect/stm32-readme
STM32: Add port readme, make flash
2020-04-28 12:32:03 -07:00