Commit Graph

3496 Commits

Author SHA1 Message Date
Dan Halbert 3fcd999130
Merge pull request #3130 from pewpew-game/brownout-level
SAMD: make the brownout detection level configurable per board
2020-07-13 16:26:11 -04:00
Lucian Copeland b8910676db Add missing enum preprocessor protection 2020-07-13 11:52:30 -04:00
Yihui Xiong c8752ff93e use RGB LEDs as status indicators 2020-07-11 21:25:32 +08:00
Yihui Xiong 8e26fdc0e9 add LED status, remove unused macros 2020-07-11 10:51:31 +08:00
Radomir Dopieralski 742f9cfdb0 Fluff M0: additional pins on version 1.3 of the board 2020-07-10 20:40:58 +02:00
Yihui Xiong 7ff499046b use VID & PIDs granted by Seeed 2020-07-11 00:37:45 +08:00
Lucian Copeland eb86010176 Enable RGB Matrix 2020-07-10 11:06:12 -04:00
Scott Shawcroft 0068c76fa6
Merge pull request #3135 from arms22/bless_dev_board_multi_sensor
Add new board BLE-SS dev board Multi Sensor
2020-07-09 10:29:57 -07:00
Lucian Copeland edc48a505f Complete F405 pin and periph definitions 2020-07-09 13:10:18 -04:00
Lucian Copeland 2bcc5c06c2 Fix advanced claimed pin/package timer search 2020-07-09 11:42:37 -04:00
Yihui Xiong 678f266394 fix pre-commit check 2020-07-09 10:25:46 +00:00
Radomir Dopieralski e0733d153e SAMD: configurable brownout, separate the variables 2020-07-09 12:17:07 +02:00
Yihui Xiong 96f6ce222c add makerdiary m60 keyboard
Signed-off-by: Yihui Xiong <yihui.xiong@hotmail.com>
2020-07-09 10:02:27 +00:00
Yihui Xiong e81d22cd67 add makerdiary nrf52840 m.2 devkit
Signed-off-by: Yihui Xiong <yihui.xiong@hotmail.com>
2020-07-09 10:01:04 +00:00
arms22 bb5cdcf954 Add new board BLE-SS dev board Multi Sensor 2020-07-09 11:26:45 +09:00
Lucian Copeland 9c38f5dcb1 Merge remote-tracking branch 'upstream/main' into stm32-timer-allocator 2020-07-08 16:03:12 -04:00
Scott Shawcroft ce214e82a5
Merge pull request #3127 from Arudinne/Raytac_MDBT50Q-DB-40
Add new board Raytac MDBT50Q-DB-40
2020-07-08 11:34:56 -07:00
Radomir Dopieralski 83a27edd20 SAMD: make the brownout detection level configurable per board
Not all boards have external flash or other components that make them
require 2.7V -- sometimes we can get considerably longer battery life
by decreasing this requirement.

In particular, pewpew10 and pewpew_m4 are powered directly from
battery, with no LDO, and should work fine down to 1.6V.
2020-07-08 19:59:53 +02:00
Arudinne 768149fb01 modified: ports/nrf/boards/raytac_mdbt50q-db-40/pins.c 2020-07-08 10:36:41 -05:00
Arudinne 5a9aac472a modified: ports/nrf/boards/raytac_mdbt50q-db-40/pins.c 2020-07-07 14:37:59 -05:00
Jeff Epler 57ab4f1329 stm: SPI: revamp pin search code
I discussed with Hierophect on Discord about how to "de-nest" the code
for configuring SPI objects on STM, because the problems with one
nesting level per pin becomes unmanageable with the up to 10 pins of
SDIO.

This code (which is only compile-tested so far) demonstrates the concept
we discussed.

The SCK pin is always required.  Loop over all possibilities of the SCK
pin.  When we are considering a particular item in the mcu_spi_sck_list
we have now become committed to using a particular periph_index.  If all
the other pins can be satisfied by that periph_index, then we have a
working combination.  Once we have a working combination that is not
reserved, we can return that combination.  On reaching the end, we have
checked all the possible possibilities and can give the same errors as
before: One if there was a possibility that worked but was reserved;
and another if no possibility worked.
2020-07-07 14:37:50 -05:00
Arudinne dc2f729d19 modified: ports/nrf/boards/raytac_mdbt50q-db-40/mpconfigboard.mk
modified:   ports/nrf/boards/raytac_mdbt50q-db-40/pins.c
2020-07-07 14:37:08 -05:00
Arudinne b5af05cd31 new file: ports/nrf/boards/raytac_mdbt50q-db-40/board.c
new file:   ports/nrf/boards/raytac_mdbt50q-db-40/bootloader/6.0.0/pca10056_bootloader_6.0.0_s140.zip
	new file:   ports/nrf/boards/raytac_mdbt50q-db-40/mpconfigboard.h
	new file:   ports/nrf/boards/raytac_mdbt50q-db-40/mpconfigboard.mk
	new file:   ports/nrf/boards/raytac_mdbt50q-db-40/pins.c
2020-07-07 12:27:23 -05:00
Scott Shawcroft 965a4961ce
Merge pull request #3120 from DavePutz/issue#3049
Issue#3049 -PulseIn not working in CP5.4
2020-07-07 08:59:22 -07:00
DavePutz 0932b64ae7
Correct for SAMD51 build 2020-07-06 23:25:33 -05:00
DavePutz 1b3cb17abd
Corrected file for SAMD51 build 2020-07-06 21:47:11 -05:00
DavePutz ab4a453006
Made requested changes 2020-07-06 21:40:38 -05:00
Scott Shawcroft a7844205bd
Merge pull request #3123 from kamtom480/sdk2.0
spresense: update SDK to 2.0.1
2020-07-06 15:09:46 -07:00
Scott Shawcroft 846f01b2c8
Merge pull request #3113 from ansonhe97/main
ADD: Added Wio Terminal's functional pins and LCD driver to board init
2020-07-06 14:50:47 -07:00
Diego Elio Pettenò 34b4993d63 Add license to some obvious files. 2020-07-06 19:16:25 +01:00
Radomir Dopieralski 2f80460a2f Fluff M0: additional pins on version 1.3 of the board 2020-07-06 19:15:41 +01:00
Kamil Tomaszewski 97355f8fb7 spresense: update SDK to 2.0.1 2020-07-06 17:13:28 +02:00
DavePutz ac33c3fe2c
Implementation of continuous synchronization of RTC during pulsein
Flags and code to implement continuous synchronization of RTC during pulsein
2020-07-04 21:17:19 -05:00
DavePutz 94d90742dd
Implementation of RTC continuous synchronization during pulsein
Flags and code to implement RTC continuous synchronization during pulsein
2020-07-04 21:15:38 -05:00
ndgarage e514782cc6 update-with-new-usb-PID 2020-07-04 10:39:21 -06:00
ansonhe97 36ef3476de Fix depreciate terminology 2020-07-04 11:21:58 +08:00
Lucian Copeland c72e3536f1 Merge remote-tracking branch 'upstream/main' into stm32-timer-allocator 2020-07-03 09:50:05 -04:00
ansonhe97 2ecb46f192 Fix CI 2020-07-03 13:42:27 +08:00
ansonhe97 2a92cf8d8b ADD: Added LCD driver to board init 2020-07-03 12:44:20 +08:00
ansonhe97 49aacc8596 ADD: Fixed wrong SPI pins and added more functional pins 2020-07-03 12:43:21 +08:00
Scott Shawcroft 4d7b9cde33
Merge pull request #3109 from pewpew-game/fluff_m0
Fluff M0: additional pins on version 1.3 of the board
2020-07-02 15:43:32 -07:00
Radomir Dopieralski fce35c3481 Fluff M0: additional pins on version 1.3 of the board 2020-07-02 22:57:58 +02:00
Scott Shawcroft 4a21426377
Merge pull request #3103 from hierophect/stm32-simplex-spi-fix
STM32: add debug flags, fix hang in simplex SPI
2020-07-02 13:42:08 -07:00
Lucian Copeland 4b66483757 Update submodule, revert direction change 2020-07-02 15:38:37 -04:00
Kamil Tomaszewski f4a2474447 spresense: Add support for sdioio 2020-07-02 15:26:59 +02:00
Jeff Epler fcddfd0f39
Merge pull request #3083 from tannewt/esp32s2_busio
Add busio support for the ESP32-S2
2020-07-01 21:02:08 -05:00
Lucian Copeland 87d58b3b0a STM32: add debug flags, fix hang in simplex SPI 2020-07-01 17:48:10 -04:00
Scott Shawcroft 367d3800fc
Return false if we already have the lock 2020-07-01 14:35:25 -07:00
ndgarage 0537f4e775 restore-ndgarage_ndbit6-to-original 2020-07-01 14:12:52 -06:00
ndgarage c759c9a2aa add-ndgarage_ndbit6_v2-update 2020-07-01 13:58:07 -06:00
svgops b80dbb4b2c add-ndgarage_ndbit6_v2 2020-07-01 12:06:59 -06:00
Lucian Copeland ab9a64eafa Add timer allocator, adjust pulsio to use general purpose timers 2020-07-01 10:35:49 -04:00
Jeff Epler 3a17a79bf2
Merge pull request #3094 from kamtom480/mkspk
spresense: add elf32.h for mkspk
2020-07-01 06:58:40 -05:00
ansonhe97 d4e28dd233 ADD: added more special pins on Wio Terminal 2020-07-01 17:06:26 +08:00
Scott Shawcroft 5028804878
Remove fixed pointers and check UART return 2020-06-30 15:29:42 -07:00
Scott Shawcroft 74ad5e80ce
Merge pull request #3089 from ansonhe97/main
Add: added Seeed's Wio Terminal Board Support
2020-06-30 10:58:24 -07:00
Scott Shawcroft 69b3d47564
Fix other esp builds 2020-06-29 18:21:53 -07:00
Scott Shawcroft 965a40b6a1
Fix cxd56 function signature 2020-06-29 17:17:46 -07:00
Scott Shawcroft 111f7ddf69
Merge pull request #2863 from jepler/sdcard-in-core
Sdcard in core
2020-06-29 16:49:58 -07:00
ansonhe97 4613f80d7a Fix end of line 2020-06-29 17:41:48 +08:00
ansonhe97 0dd17f4418 Add: Added Seeed Wio Terminal board support 2020-06-29 16:22:41 +08:00
jerryneedell bbedd43273 change CMake verision requirement 2020-06-27 13:27:42 -04:00
Scott Shawcroft 7f6bef3251
Remove debug prints 2020-06-26 16:56:17 -07:00
Scott Shawcroft 08749630a2
Fix SPI RX and remove debug prints 2020-06-26 16:30:24 -07:00
Scott Shawcroft 2d579cc995
Use NULL for deinited DigitalInOut
This fixes a Display issue where no backlight pin is given but it's
still deinitialized.
2020-06-26 12:33:50 -07:00
Scott Shawcroft a9f257bcd6
Store host_id so that never reset works 2020-06-26 12:32:56 -07:00
Jeff Epler c5db97c50f atmel-sam: sdio: disable debug prints by default 2020-06-26 13:16:16 -05:00
Scott Shawcroft 0f074fb956
Merge pull request #3072 from PTS93/patch-2
Update minimum required cmake to 3.16
2020-06-26 10:02:24 -07:00
Jeff Epler f496c0b58d atmel-samd: Add SDIO SD card interface 2020-06-26 11:50:42 -05:00
Jeff Epler d4b9458512 samd: sdio: Add needed files from atmel start 2020-06-26 11:50:41 -05:00
Jeff Epler 57fde2e07b sdcardio: implement new library for SD card I/O
Testing performed: That a card is successfully mounted on Pygamer with
the built in SD card slot

This module is enabled for most FULL_BUILD boards, but is disabled for
samd21 ("M0"), litex, and pca10100 for various reasons.
2020-06-26 11:50:23 -05:00
Scott Shawcroft 9ec9644928
Merge pull request #3071 from jgillick/jeremy/stm-nvm-flash
STM32 (ThunderPack) - Move NVM sector to increase program size.
2020-06-26 09:45:26 -07:00
jgillick 017c188ab5 Move NVM block to increase program size. 2020-06-25 21:46:15 -07:00
Timon a80d7479d0
Update minimum required cmake to 3.16
Earliest tested version that compiles.
Failed with version 3.10
2020-06-26 02:04:14 +02:00
Timon 0a41b86f6b
Fix typo inserting IDF_PATH variable 2020-06-26 01:36:03 +02:00
Lucian Copeland 6c91af7d56 WIP 2020-06-25 17:27:01 -04:00
Jeff Epler 103ad9966a remove machine_i2c, machine_spi
This micropython code is not used in circuitpython
2020-06-25 11:44:21 -05:00
Jeff Epler 1d2cc0b968 I2CPeripheral: Rename class and its module
This is an incompatible change.
2020-06-25 11:44:19 -05:00
Jeff Epler 07eb7d653c
Merge pull request #3042 from kamtom480/gnss
Add gnss module
2020-06-25 11:08:40 -05:00
Jeff Epler 076a96ccc6
Merge pull request #3046 from jepler/same51
Add basic SAM E54  support and SAM E54 Xplained board
2020-06-25 06:55:27 -05:00
Kamil Tomaszewski 436b15e558 spresense: add elf32.h for mkspk 2020-06-25 10:26:33 +02:00
Scott Shawcroft d768d4d37a
Merge branch 'main' into gnss 2020-06-24 17:17:43 -07:00
Scott Shawcroft 03e5043af4
Turn off Idle WDT and speed up CPU 2020-06-24 13:10:31 -07:00
Scott Shawcroft ed6e81d688
Switch SPI to polling DMA and enable displayio 2020-06-24 13:10:08 -07:00
Scott Shawcroft 496e16d99b
Handle memory (hopefully). Short TX works 2020-06-24 12:47:59 -07:00
Scott Shawcroft c5fa9730a8
Compiles! 2020-06-24 12:47:59 -07:00
Scott Shawcroft fc9c0ba573
Initial SPI implementation. Almost certainly doesn't compile 2020-06-24 12:47:59 -07:00
Scott Shawcroft f52f60b17d
Add UF2 build target 2020-06-24 12:47:59 -07:00
Scott Shawcroft 7b56617f8e
Turn off stub so flash works over native usb 2020-06-24 12:47:58 -07:00
Scott Shawcroft a26102607e
Add UART support 2020-06-24 12:47:58 -07:00
Scott Shawcroft 6f050d7af3
Add pull up testing, proper us delay and stop supporting 45 and 46 for I2C 2020-06-24 12:47:58 -07:00
Scott Shawcroft ae52d052cb
Fix I2C thanks to Mark! 2020-06-24 12:47:58 -07:00
Scott Shawcroft d0401f02a9
Add initial I2C support, not quite working fully though 2020-06-24 12:47:58 -07:00
Jeff Epler 87835c77e8
Merge pull request #3038 from jepler/compute-usb-devices
Compute USB_DEVICES instead of requiring it to be specified
2020-06-24 13:31:56 -05:00
Kamil Tomaszewski ab4c09cea7 gnss: Add timestamp 2020-06-24 11:14:44 +02:00
Kamil Tomaszewski 3509dad5b3 gnss: Remove start and stop 2020-06-24 11:14:44 +02:00
Kamil Tomaszewski 343f093ead spresense: Add support for GNSS 2020-06-24 11:14:44 +02:00
Jeff Epler f232aef786 supervisor.mk: Compute USB_DEVICES; remove from boards and ports
Since Actions passed on the previous commit, where this computed value
was checked against the specified value (if any), this is no net change,
except that we no longer need to specify it for particular boards or
ports.
2020-06-23 12:59:01 -05:00
Scott Shawcroft f67b307371
Merge pull request #3045 from k0d/stm32_alignment_issue
Fixes issue with memory alignment in STM32
2020-06-23 10:54:08 -07:00
Jeff Epler 93d3629da2 stm: Sort configuration options and make them all conditional
This makes them all overridable on the board level, tersely
2020-06-23 11:02:38 -05:00
Jeff Epler 0110463811 stm: Disable USB MIDI and most USB HID
.. it was not in the USB descriptors anyway (lack of enough endpoints?)
2020-06-23 11:01:36 -05:00
Jeff Epler 3f112d28e3 mimxrt10xx: Disable USB MIDI
.. it was not in the USB descriptors anyway (lack of enough endpoints?)
2020-06-23 10:57:32 -05:00
Jeff Epler 458eef052e esp32s2: Disable USB MIDI
.. it was not in the USB descriptors anyway (lack of enough endpoints?)
2020-06-23 10:57:25 -05:00
Jeff Epler 38659b566c atmel-samd: Finish disabling USB MIDI and/or HID on certain boards 2020-06-23 10:56:27 -05:00
Jeff Epler d5074220a8 atmel-samd: Add SAM E54 Xplained board
Few peripherals are actually tested.  However, USB, I2C and GPIO seem to work.

Most pins are silkscreened with the "PX00" style, so the board module
only includes the small number that are screened differently.

The default SPI, I2C, and UART are the ones on the EXT2 header.  This is
arbitrary, but the I2C on this connector is shared with the on-board I2C
devices and the PCC header, making it the most versatile.
2020-06-23 10:41:48 -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 0b99baccb8
Merge pull request #3050 from florin-trutiu/loc-ber-m4-base-board
PID request for a new board configuration
2020-06-22 15:09:42 -07: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 d43449a6d6 sparkfun samd51 thing plus: Fix board.I2C()
This had the SDA and SCL pins transposed, so nothing worked.
2020-06-22 10:45:27 -05: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
Jeff Epler 6638bc32c3 samd: Makefile: Regularize whitespace 2020-06-22 10:45:27 -05:00
Jeff Epler 8a760b0657 stm: Pin.c: Compute GPIO_PORT_COUNT instead of specifying manually 2020-06-22 10:45:27 -05:00
Jeff Epler a580f0f1c4 _pew: move to common-hal
I noticed that this code was referring to samd-specific functionality,
and isn't enabled except in one samd board (pewpew10).  Move it.

There is incomplte support for _pew in mimxrt10xx which then caused build
errors; adding a #if guard to check for _pew being enabled fixes it.
The _pew module is not likely to be important on mimxrt but I'll leave the
choice to remove it to someone else.
2020-06-22 10:45:27 -05:00
Jeff Epler 5a3a0a5092 stm: Makefile: sort files in SRC_STM32 2020-06-22 10:45:23 -05:00
Dan Halbert 1687c8b1e3 delay 1ms on SAMD51 when reading processor voltage 2020-06-19 15:25:04 -04:00
Florin Trutiu b316549590 Added the new assigned VID/PID pair 2020-06-19 19:26:29 +03:00
Florin Trutiu 178be2e3c9 loc_ber_m4_base_board 2020-06-19 18:56:20 +03:00
Mark Olsson 23da0fa99c Fixes issue with memory alignment in STM32
When compiling with optimizations on, an issue occurs where the claimed_pins/never_reset_pins memory location is shared with another variable. This causes some bad memory read, so the USB pins ended up being reset. Setting these to have an alignment of 4 bytes resolves this.

Tested on nucleo_f746zg
2020-06-18 00:51:04 +02:00
Scott Shawcroft a345223dac
Merge pull request #3031 from jepler/improve-shared-bindings-links
docs: Improve 5.0.x <-> main branch doc linkrot
2020-06-16 11:49:27 -07:00
Lucian Copeland fd4aafacbe Add port D to LQFP64 2020-06-16 12:33:15 -04:00
Jeff Epler 9d5ccccf7d cxd56: Disable HID and MIDI
These are already disabled via the USB_DEVICES setting, but the code is
included anyway.
2020-06-15 15:22:45 -05:00
Jeff Epler a9614bb964 cxd56: Sort the configuration settings 2020-06-15 15:22:45 -05:00
Lucian Copeland 2aac3cbdce Revert I2C timing overrides, reduce scope to module only 2020-06-15 13:51:09 -04:00
Jeff Epler 3c3cad5ae6 docs: Improve 5.0.x <-> main branch doc linkrot
This improves, but does not entirely fix, the broken links that result
from the autoapi change.  It fixes module-level links, but class links
still do not work (e.g., /shared-bindings/displayio/Palette.html (5.0.x)
is now just /shared-bindings/displayio/#displayio.Palette).
2020-06-14 11:12:35 -05:00
Scott Shawcroft e27f68ffe7
Merge pull request #3025 from hierophect/stm32-f7-startup
STM32: Add DTCM and ITCM support to F7 series
2020-06-11 11:03:48 -07:00
Lucian Copeland 724637faa3 Move I2C speed to clock-style definition 2020-06-11 11:17:51 -04:00
Lucian Copeland c08702414e Add macros for setting correct F7 and H7 I2C timing 2020-06-10 16:36:44 -04:00
Lucian Copeland bf3a5afca1 Merge branch 'stm32-f7-startup' into stm32-i2cspeed 2020-06-10 16:16:15 -04:00
Lucian Copeland c88a8e66c6 Minor comment fix 2020-06-10 13:22:21 -04:00
Lucian Copeland 7cc8b784c3 Add missing openmv definitions 2020-06-10 10:31:24 -04:00
Lucian Copeland b414f82669 Add DTCM and ITCM support to F7 series 2020-06-09 18:01:52 -04:00
Scott Shawcroft 9b8d648986
Merge pull request #3020 from DavePutz/issue2958
Issue #2958 Correct calculation of subticks being returned from port_get_raw_ticks() for esp32s2
2020-06-09 12:41:18 -07:00
DavePutz ec7a3feeba
Redid formula for calculating subticks
changed subticks calculation to give a range from 0 to 32767.
2020-06-09 10:08:49 -05:00
Scott Shawcroft 0ba541d498
Merge pull request #3017 from Nicell/nice_nano
Add nice!nano board support
2020-06-08 14:47:22 -07:00
DavePutz d8bb2d7c6d
Correct ticks being returned from port_get_raw_ticks()
Issue #2958 . Correct calculation of usec back to ticks in port_get_raw_ticks().
2020-06-08 10:52:27 -05:00
Scott Shawcroft 004d644184
Merge pull request #3009 from hierophect/stm32-LSE-startup-fix
STM32: Rework LSE clock init, allow clock overrides
2020-06-07 22:37:53 -07:00
Nick 33496e9c68 Add nice!nano board support 2020-06-05 19:58:54 -05:00
Lucian Copeland 93cffaa87e Fix pin macros typo, add extra flash protection 2020-06-05 16:43:08 -04:00
Lucian Copeland ad0971fb25 Override HAL_Delay and HAL_GetTick 2020-06-05 13:56:32 -04:00
Scott Shawcroft 6400113bb9
Merge pull request #3001 from hierophect/mimxrt-teensy-boot
mimxrt10xx: Disable pin_reset on 1060 boards
2020-06-05 10:28:53 -07:00
Lucian Copeland a0977cac7b Merge remote-tracking branch 'upstream/master' into stm32-LSE-startup-fix 2020-06-04 16:15:38 -04:00
Lucian Copeland 74effeeefd Add temporary fix warning 2020-06-04 13:30:07 -04:00
Lucian Copeland d14e34449b Rework LSE clock init, allow clock overrides 2020-06-04 13:21:29 -04:00
Lucian Copeland c93ccd1e91 Disable pin resets on the 1060 2020-06-03 12:07:08 -04:00
Diego Elio Pettenò dd5d7c86d2 Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-03 10:56:35 +01:00
Lucian Copeland b5b9a56918 Update teensy 4.0/4.1 pin protections 2020-06-02 18:05:59 -04:00
Scott Shawcroft db04fd1725
Merge pull request #2933 from simmel-project/wdt-nrf
Add Watchdog timer and add support for NRF watchdog
2020-06-02 10:33:24 -07:00
Sean Cross ed8a52d1db litex: remove call to `board_init()`
These calls were all moved into `main.c`, however this call was not
removed from litex. As a result, litex was calling `board_init()` twice.

This is currently not a problem, as `fomu` is able to be initialized
twice without issue, however future boards may have issue with this.

This fixes #2991.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-06-02 10:19:40 +08:00
Scott Shawcroft 959f7297da
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-06-01 17:01:16 -07:00
Scott Shawcroft 4146d6f872
Merge pull request #2890 from jepler/nrf-audio-tick
nrf: put supervisor enable/disable tick in place
2020-06-01 15:51:22 -07:00
Scott Shawcroft dd2cd6f002
Merge pull request #2979 from hierophect/stm32-remove-crystals
STM32: Set correct crystal settings on Discovery boards
2020-06-01 15:21:39 -07:00
Scott Shawcroft 323cca8910
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-06-01 15:18:12 -07:00
Lucian Copeland 75eb44f234 Note temporary issue with Nucleo boards 2020-06-01 12:26:08 -04:00
Kamil Tomaszewski ce337eaa27 Fix port_get_raw_ticks 2020-06-01 11:35:46 +02:00
Dan Halbert 4667d4de8c
Merge pull request #2975 from dhalbert/aesio-nrf52840
enable aesio on all nRF52840 boards
2020-05-29 14:07:30 -04:00
Lucian Copeland 0fe7efdf36 Set correct crystal settings on Discovery boards 2020-05-29 14:01:34 -04:00
Scott Shawcroft ddcae19254
Merge pull request #2964 from hierophect/mimxrt-busio-cleanup
mimxrt10xx: Busio cleanup and bugfixes
2020-05-29 10:42:16 -07:00
Scott Shawcroft 2fd7a43f2f
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-05-29 10:16:24 -07:00
Lucian Copeland fe75c7793c Fix SWO/Analog overlap, style changes 2020-05-29 12:19:37 -04:00
Dan Halbert 0d2fee95e2 enable aesio on all nRF52840 boards 2020-05-29 11:06:30 -04:00
Scott Shawcroft 2fb4fa3289
Spill registers before scanning the stack.
From the change:

    // xtensa has more registers than an instruction can address. The 16 that
    // can be addressed are called the "window". When a function is called or
    // returns the window rotates. This allows for more efficient function calls
    // because ram doesn't need to be used. It's only used if the window wraps
    // around onto itself. At that point values are "spilled" to empty spots in
    // the stack that were set aside. When the window rotates back around (on
    // function return), the values are restored into the register from ram.

    // So, in order to read the values in the stack scan we must make sure all
    // of the register values we care about have been spilled to RAM. Luckily,
    // there is a HAL call to do it. There is a bit of a race condition here
    // because the register value could change after it's been restored but that
    // is unlikely to happen with a heap pointer while we do a GC.

Fixes #2907
2020-05-28 18:34:14 -07:00
Scott Shawcroft 796373b8be
A number of small ESP32S2 fixes:
* Fix flash writes that don't end on a sector boundary. Fixes #2944
* Fix enum incompatibility with IDF.
* Fix printf output so it goes out debug UART.
* Increase stack size to 8k.
* Fix sleep of less than a tick so it doesn't crash.
2020-05-28 15:43:55 -07:00
Scott Shawcroft a9419b5d46
Update ESP IDF 2020-05-28 15:38:48 -07:00
Lucian Copeland 9ee278d2ac Merge remote-tracking branch 'upstream/master' into mimxrt-busio-cleanup 2020-05-28 12:24:37 -04:00
Lucian Copeland fd00bb8b7f Fix pin reset flash conflict error 2020-05-28 12:15:21 -04:00
Scott Shawcroft 9380c34cf7
Merge remote-tracking branch 'adafruit/master' into wdt-nrf 2020-05-27 10:47:08 -07:00
Scott Shawcroft 0db8b888d3
Merge pull request #2934 from hierophect/mimxrt-uart-oneway
mimxrt10xx: add one-directional UART
2020-05-27 10:38:00 -07:00
Lucian Copeland a59798ed49 Merge branch 'mimxrt-uart-oneway' into mimxrt-busio-cleanup 2020-05-27 12:31:16 -04:00
Lucian Copeland 9f5520135c translations 2020-05-27 11:54:52 -04:00
Lucian Copeland a25e10ed59 Merge branch 'mimxrt-uart-oneway' of https://github.com/hierophect/circuitpython into mimxrt-uart-oneway 2020-05-27 11:49:11 -04:00
Lucian Copeland 1e914ac2b0 Change exception text and type 2020-05-27 11:48:52 -04:00
Dan Halbert d06a7c4671
Correct HiiBot BlueFi USB_PID
Donated a PID set for HiiBot BlueFi.
2020-05-27 11:47:15 -04:00
Lucian Copeland 53fb699436 Add pin resetting across boards, fix array size detection issue 2020-05-27 11:45:15 -04:00
arturo182 ad988013f0
Merge pull request #2961 from arturo182/i2c-exception
mimxrt10xx: Change exception type to match other ports
2020-05-27 11:24:46 +02:00
Sean Cross aac5a4f178 watchdog: use common_hal_watchdog_* pattern
This pulls all common functionality into `shared-bindings` and keeps
platform-specific code inside `nrf`. Additionally, this performs most
validation in the `shared-bindings` site.

The only validation that occurs inside platform-specific `common-hal`
code is related to timeout limits that are platform-specific.

Additionally, all documentation is now inside the `shared-bindings`
directory.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:38:29 +08:00
Sean Cross e470376c12 nrf: add ticks (not subticks) to overflow count during reset
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:50 +08:00
Sean Cross 296ba101ec nrf: set WDT priority to 2
The previous setting of `1` meant that the bluetooth system couldn't be
used when the watchdog timer was enabled.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:50 +08:00
Sean Cross d0f1b59be5 nrf: pca10100: disable some unused features to shrink image
This removes some features that are largely unused in order to get the
image to fit.

Recommended in
https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632859678

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:50 +08:00
Sean Cross 33001f4e19 nrf: simmel: shrink filesystem to fit watchdog timer
The watchdog timer has increased the amount of code and text that's
required.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:50 +08:00
Sean Cross daf7c2857d nrf: port: save rtc value across reboots
As part of the reset process, save the current tick count to an
uninitialized memory location.  That way, the current tick value will be
preserved across reboots.

A reboot will cause us to lose a certain number of ticks, depending on
how long a reboot takes, however if reboots are infrequent then this
will not be a large amount of time lost.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 5edc29c6a5 nrf: microcontroller: use port reset path
For `microcontroller.reset()`, don't manually call NVIC_SystemReset().
Instead, call the `port_reset()` in case the port wants to do any
cleanup.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
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 c5c13a8ba1 nrf: reset watchdog as part of port_reset()
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 108409c6cd nrf: common-hal: finish reworking exceptions
This finishes the rework of the exception handler, which is once
again stored inside the watchdog timer module.

This also implements a `watchdog_reset()` that is used to disable the
RAISE watchdog, if one is enabled.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross bd086a102e Revert "add WatchDogTimeout exception"
This reverts commit 561e7e619095869f58fc728d428f3ff20e8bfc40.
2020-05-27 11:28:49 +08:00
Sean Cross 589cb1af6d nrf: watchdog: use nrfx_wdt driver
Instead of directly poking registers, use `nrfx_wdt`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross e738f5eaa1 nrf: boot into safe mode sometimes for watchdog reset
If the watchdog resets the system and we're plugged into USB, boot into
safe mode.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 08362c9cab watchdogtimer: refactor to new api
This refactors the WatchDogTimer API to use the format proposed in
https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632268227

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross ae950bc050 add WatchDogTimeout exception
This adds an exception to be raised when the WatchDogTimer times out.

Note that this currently causes a HardFault, and it's not clear why it's
not behaving properly.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 0169ea5155 nrf: discard arm exception sections
Since these exceptions are unused, don't include them in the output
binary.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 8f46133917 nrf: watchdog: implement software watchdogtimer
This adds a software WatchDogTimer implementation that can be used for
testing.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross 595f6387c2 watchdog: rename module from `wdt` and move to `microcontroller`
This also places it under the `microcontroller` object.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:49 +08:00
Sean Cross c23f151b6b nrf: enable wdt for all platforms
Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:48 +08:00
Sean Cross fbe1c05832 nrf: simmel: enable wdt support
This enables WDT support for Simmel. Other platforms cannot yet use
WDT because it overflows their flash storage.

Enable CIRCUITPY_WDT support for the nrf target.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:48 +08:00
Sean Cross abd01c5fbb nrf: add watchdog module
Add common-hal bindings to allow the watchdog module to be used
on nrf platforms.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:48 +08:00
Sean Cross 17ef2df2ca nrf: ld: add ARM.exidx to output image
With the WDT changes, building Circuit Python results in the following error:

/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: section .ARM.exidx LMA [00000000000621c8,00000000000621cf] overlaps section .data LMA [00000000000621c8,0000000000062383]

This is because unwinding data is getting generated, but has nowhere to go.
Re-enable this data in the linker script so it is saved.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27 11:28:48 +08:00
Dan Halbert 3574670226
Merge pull request #2931 from tannewt/esp32s2_digitalio
Finish digitalio and pin use tracking for ESP32S2
2020-05-26 19:18:45 -04:00
Scott Shawcroft c917270da7
Merge pull request #2956 from hathach/fix-samd-wfi
fix racing issue for SAMD when executing WFI
2020-05-26 14:54:24 -07:00
Scott Shawcroft ffe0e0edc3
Merge pull request #2938 from DavePutz/issue2894
Add an increment to tcc_refcount to allow deinit to work correctly
2020-05-26 14:39:59 -07:00
arturo182 d6c59c4de0 mimxrt10xx: Change exception type to match other ports 2020-05-26 22:36:30 +02:00