Commit Graph

3423 Commits

Author SHA1 Message Date
Scott Shawcroft
5e3a853db4
Turn off GC opt on uchip board 2020-07-21 12:51:59 -07:00
Scott Shawcroft
678faff464
Be more aggressive with uChip build 2020-07-21 11:02:23 -07:00
root
49decf90c9 Add option for higher optimization levels 2020-07-21 10:11:08 -05:00
Scott Shawcroft
0c6935e336
Merge branch 'main' into disable_network 2020-07-20 16:28:22 -07:00
Scott Shawcroft
12edb57aac
Merge pull request #3166 from theacodes/bhb-adc
Add _bhb user module for Big Honking Button
2020-07-20 16:24:36 -07:00
Thea Flowers
7ba89f5330 Add _bhb user module for Big Honking Button
BHB needs better accuracy from the ADC readings. To avoid changing the ADC configuration for all boards or adding complexity to AnalogIn, I implemented a custom user module to allow the BHB to talk to the ADC in the way that it needs to. I'm open to other approaches here, but this seemed like the least invasive and complex option.
2020-07-18 22:45:08 -07:00
Radomir Dopieralski
11ef43b071 pewpew_m4: Disable USB_HID back
German translation fails to build, so I have to disabled USB_HID after
all.
2020-07-18 20:09:30 +02:00
Radomir Dopieralski
8d692f33a8 pewpew_m4: Enable analogio and usb_hid
The newest version for the Stage library for PewPewM4 no longer contains
embedded graphics, which frees enough space in flash to enabled back
AnalogIO and also add USB_HID. There is still ~192 bytes left free.

If new additions to CircuitPython make it grow further, we can disable
USB_HID again.
2020-07-18 19:30:40 +02:00
Scott Shawcroft
610e0171aa
Disable existing native networking.
We're moving towards a co-processor model and a Wiznet library is
already available.

New native APIs will replace these for chips with networking like the
ESP32S2 but they won't be these.
2020-07-17 17:43:02 -07:00
Lucian Copeland
207369ec09 Add boilerplate, create basic PWMOut test 2020-07-17 17:28:23 -04:00
Jeff Epler
9cdf5e148a
Merge pull request #2879 from jepler/background-callback
Use a linked list of background tasks to perform
2020-07-17 15:46:03 -05:00
Jeff Epler
6912d31560 uchip: reclaim some flash space 2020-07-17 14:32:05 -05:00
Lucian Copeland
dc6902a33e Exclude timers from H7 builds 2020-07-16 17:11:24 -04:00
Lucian Copeland
6a49766df0 Fix pulseIO reset and frequency issues, remove IRQ conflict 2020-07-16 15:45:18 -04:00
Scott Shawcroft
72f6d7ee21
Merge pull request #3155 from jepler/esp32s2-parallel-build
esp32s2: Take care to invoke the sub-build-system only once
2020-07-16 11:26:53 -07:00
Scott Shawcroft
7bb508bf43
Merge pull request #3157 from tinkeringtech/tinkeringtech-scoutmakes-azul
Addition of Tinkeringtech ScoutMakes Azul nRF52840 based platform to CircuitPython
2020-07-16 11:03:31 -07:00
TinkeringTech
49fcfd14d2 Added the TinkeringTech ScoutMakes Azul platform to CircuitPython 2020-07-15 21:49:34 -04:00
Jeff Epler
1df48176ce supervisor: factor supervisor_background_tasks from sundry ports 2020-07-15 11:49:44 -05:00
Jeff Epler
6160d11c5a supervisor: factor out, Handle USB via background callback 2020-07-15 11:49:44 -05:00
Jeff Epler
a2919a6fb2 esp32s2: Use the device's EUI-48 address as unique ID
On my hardware, esptool reports
    MAC: 7c:df:a1:02:6c:b8
after this change, the USB descriptor says SerialNumber: 7CDFA1026CB8
and microcontroller.cpu.id has
    >>> "".join("%02x" % byte for byte in microcontroller.cpu.uid)
    'c7fd1a20c68b'

Note that the nibble-swapping between USB and cpu.uid is typical.
For instance, an stm32 board has USB SerialNumber
24002500F005D42445632302 but hex-converted microcontroller.cpu.id
420052000f504d4254363220.
2020-07-15 11:45:13 -05:00
Jeff Epler
910f69c42b esp32s2: Take care to invoke the sub-build-system only once
This allows "make -j" in the outer build system to function properly,
with a potentially large decrease in build times on high end desktop
systems.
2020-07-15 10:30:07 -05:00
Jeff Epler
742aa740f6 samd: audio: Move to background callback
Testing performed: Played half of the Bartlebeats album :) :)
2020-07-15 09:26:47 -05:00
Jeff Epler
dc74ae83da nRF: Always use sd_nvic_critical_region calls
The motivation for doing this is so that we can allow
common_hal_mcu_disable_interrupts in IRQ context, something that works
on other ports, but not on nRF with SD enabled.  This is because
when SD is enabled, calling sd_softdevice_is_enabled in the context
of an interrupt with priority 2 or 3 causes a HardFault.  We have chosen
to give the USB interrupt priority 2 on nRF, the highest priority that
is compatible with SD.

Since at least SoftDevice s130 v2.0.1, sd_nvic_critical_region_enter/exit
have been implemented as inline functions and are safe to call even if
softdevice is not enabled.  Reference kindly provided by danh:
 https://devzone.nordicsemi.com/f/nordic-q-a/29553/sd_nvic_critical_region_enter-exit-missing-in-s130-v2

Switching to these as the default/only way to enable/disable interrupts
simplifies things, and fixes several problems and potential problems:
 * Interrupts at priority 2 or 3 could not call common_hal_mcu_disable_interrupts
   because the call to sd_softdevice_is_enabled would HardFault
 * Hypothetically, the state of sd_softdevice_is_enabled
   could change from the disable to the enable call, meaning the calls
   would not match (__disable_irq() could be balanced with
   sd_nvic_critical_region_exit).

This also fixes a problem I believe would exist if disable() were called
twice when SD is enabled.  There is a single "is_nested_critical_region"
flag, and the second call would set it to 1.  Both of the enable()
calls that followed would call critical_region_exit(1), and interrupts
would not properly be reenabled.  In the new version of the code,
we use our own nesting_count value to track the intended state, so
now nested disable()s only call critical_region_enter() once, only
updating is_nested_critical_region once; and only the second enable()
call will call critical_region_exit, with the right value of i_n_c_r.

Finally, in port_sleep_until_interrupt, if !sd_enabled, we really do
need to __disable_irq, rather than using the common_hal_mcu routines;
the reason why is documented in a comment.
2020-07-15 09:26:47 -05:00
Lucian Copeland
818b96ae61 Fix IRQ enum protections 2020-07-14 16:33:36 -04:00
Scott Shawcroft
90ad9beff5
Merge pull request #3136 from xiongyihui/master
Add 2 boards nRF52840 M.2 devkit and M60 Keyboard
2020-07-13 17:14:18 -07:00
Scott Shawcroft
51c888d4be
Merge pull request #3003 from Flameeyes/master
License tagging according to REUSE specifications.
2020-07-13 16:28:49 -07:00
Scott Shawcroft
d712d1281c
Merge branch 'main' into master 2020-07-13 15:53:44 -07:00
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