Commit Graph

214 Commits

Author SHA1 Message Date
Sean Cross c7efc94a33 watchdog: move timeout exception to shared-bindings
Make this exception globally available to all platforms that have
enabled the watchdog timer.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 15530a69c7 supervisor: tick: check for watchdog exception if enabled
Check to see if the current exception is a Watchdog exception, if it's
enabled. This ensures we break out of the current sleep() if a watchdog
timeout hits.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 8c5df5f732 supervisor: add a new WATCHDOG_RESET safe mode reason
This mode will be used if the board is reset due to the watchdog
expiring.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross ec99dae953 tick: break on watchdog timeout exception
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross d1a7fdd9d4 supervisor: support debugging tinyusb
Allow for passing `-DCFG_TUSB_DEBUG=1` or `-DCFG_TUSB_DEBUG=2` on the
command line to enable debugging tinyusb within circuitpython.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-21 21:35:30 +08:00
Scott Shawcroft 916ca9f8a6
Merge pull request #2910 from tannewt/esp32s2
Add initial ESP32S2 support
2020-05-19 12:53:23 -07:00
Sean Cross 34f91f01c6 bleio: adapter: add advertising timeout and status
Add a field to allow specifying a timeout when initiating advertising.
As part of this, add a new property to determine if the device is still
advertising.

Additionally, have the `anonymous` property require a timeout, and set
the timeout to the maximum possible value if no timeout is specified.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 15:01:19 +08:00
Sean Cross cfe65742a3 _bleio: support anonymous advertising
Add a new parameter to the `start_advertising()` function to enable
anonymous advertising.  This forces a call to `sd_ble_gap_privacy_set()`
with `privacy_mode` set to `BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY` and
`private_addr_type` set to
`BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE`.

With this, addresses will cycle at a predefined rate (currently once
every 15 minutes).

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 15:01:18 +08:00
Scott Shawcroft 2c2b53303d
Merge pull request #2837 from k0d/serial-debug
Add support for a debug console, such as ST-Link VCP.
2020-05-18 18:13:31 -07:00
Mark Olsson 007c92ee6a Enable showing the console on a debug uart 2020-05-19 02:02:52 +02:00
Scott Shawcroft 6aaab005c5
Initial ESP32S2 port.
Basic blinky works but doesn't check pins.
2020-05-15 15:36:16 -07:00
Max Holliday 964040b770 More erroneous else statements 2020-05-09 12:16:04 -07:00
Max Holliday 8b6587a0c6 Unified single_status_byte & no_reset_cmd behavior 2020-05-09 12:09:01 -07:00
Max Holliday 9e01bb2136 Removing erroneous else statements 2020-05-09 12:03:26 -07:00
Max Holliday 9ef28d8536 Replacing device that was accidentally deleted 2020-05-09 12:00:59 -07:00
Dan Halbert c377d4bea7
Merge branch 'master' into non-standard-nvm 2020-05-04 16:08:45 -04:00
Brian Dean 28179a3aaf .../external_flash.c: Don't attempt to issue CMD_READ_STATUS2 for
devices with only a single_status_byte.
2020-05-03 18:33:01 -04:00
Max Holliday cc290c50c6 fixing diff error 2020-04-28 18:15:38 -07:00
Max Holliday 6c4decd4e2 decoupling chip specific functions from EXTERNAL_FLASH_QSPI_SINGLE 2020-04-28 11:51:07 -07:00
Scott Shawcroft 755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-27 16:45:10 -07:00
Max Holliday 86943ca8a1 Merge remote-tracking branch 'adafruit/master' 2020-04-27 13:51:51 -07:00
Scott Shawcroft 9e4b94f466
Merge pull request #2805 from tannewt/update_tinyusb
Update tinyusb
2020-04-26 20:55:36 -07:00
Scott Shawcroft dcb0e50f04
Fix USB midi and hid disable. 2020-04-21 14:15:44 -07:00
Sean Cross 05b5356acc external_flash: add support for mx25r1635f
This flash chip is used in Simmel.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-04-21 09:56:05 +08:00
Scott Shawcroft bebf27e733
Merge remote-tracking branch 'adafruit/master' into lower_power
This isn't perfect and needs a bit more testing.
2020-04-20 18:25:13 -07:00
Jeff Epler 5fcc6d6286 RGBMatrix: finish renaming from Protomatter
This gets all the purely internal references.  Some uses of
protomatter/Protomatter/PROTOMATTER remain, as they are references
to symbols in the Protomatter C library itself.
2020-04-17 18:44:07 -05:00
Scott Shawcroft 7e3d4c61b5
Update TinyUSB and add interrupt hooks. 2020-04-17 14:16:49 -07:00
Scott Shawcroft b580b34cbf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-14 17:14:44 -07:00
Jeff Epler d8362ef654 displayio: swap colors in palettes too
.. change the in-rom palette to be in RGB565 order
2020-04-14 18:25:00 -05:00
Jeff Epler 1f3821220e fix build for non-displayio & non-protomatter targets 2020-04-14 18:24:58 -05:00
Jeff Epler 3a94412cd3 protomatter: more memory allocation fixes
- bump supervisor alloc count by 4 (we actually use 5)
 - move reconstruct to after gc heap is reset
 - destroy protomatter object entirely if not used by a FramebufferDisplay
 - ensure previous supervisor allocations are released
 - zero out pointers so GC can collect them
2020-04-14 18:24:58 -05:00
Jeff Epler 094fe05bdd allow retrieving info about a supervisor allocation 2020-04-14 18:24:54 -05:00
Max Holliday 826837186c adds standard (non-queued) SPI support to QSPI for external flash 2020-04-07 18:17:25 -07:00
Scott Shawcroft c0ba2a839f
Updates based on feedback from jepler 2020-04-06 16:03:31 -07:00
Scott Shawcroft e99cf6e441
Rework sleep timing
It didn't account for background task time and could end up
sleeping for way longer than it should because the RTC compare time
had already passed.
2020-04-03 18:07:56 -07:00
Scott Shawcroft c248730bd1
Clean up 2020-04-02 17:36:09 -07:00
Scott Shawcroft 8fe512c7e9
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-03-31 15:13:58 -07:00
Brian Dean b1d83c3f5e supervisor/shared/external_flash/devices.h: Add MX25L51245G support.
Add external flash support for Macronix MX25L51245G 64MiB SPI flash.
2020-03-25 17:16:09 -04:00
Scott Shawcroft 2623022c84
Initial work for STM32. Need to fix us delay and PulseIn still. 2020-03-20 12:58:34 -07:00
Scott Shawcroft 612ba2f45d
Fix DotStar status LED init. 2020-03-17 12:11:11 -07:00
Scott Shawcroft 4297ae2d0b
Fix DotStar status LED init. 2020-03-17 12:10:12 -07:00
Scott Shawcroft 7100d5e485
Fix autoreload and ticks in general 2020-03-13 16:13:24 -07:00
Scott Shawcroft ed5cdd7e09
Hopefully fix flash flush and hopefully audio as well. 2020-03-13 11:12:31 -07:00
Scott Shawcroft 418333979a
Fix autoreload, neopixel, monotonic_ns and sleep w/o SD 2020-03-13 11:12:31 -07:00
Scott Shawcroft 6f60afe8c5
First try at lowering the power consumption 2020-03-13 11:12:30 -07:00
Jeff Epler 415cb351c7
Merge pull request #2655 from jepler/thing51
samd51 thing plus: new port
2020-02-25 14:13:47 -06:00
jepler f20255813f samd51 thing plus: new port
testing performed:
 * successfully store and retrieve a 500kB file on the flash
 * square wave output on each pin appears on o'scope
 * board.SPI(), board.SERIAL(), board.I2C() all construct
2020-02-25 11:52:23 -06:00
Scott Shawcroft 876c646d09
Fix Mac crash when waking up with an ejected CIRCUITPY
We now correctly set the reason for the unit not being ready and
always start the unit.

Fixes #2567
2020-02-24 15:40:52 -08:00
Scott Shawcroft e8f7141564
Disable BLE file service for now
Fixes #2633
2020-02-20 12:15:56 -08:00
Scott Shawcroft cde9b63eab
Merge pull request #2615 from mubes/label-drive
Allow drive name to be set per target
2020-02-12 10:43:04 -08:00