40118bcf57
This changes lots of files to unify `board.h` across ports. It adds `board_deinit` when CIRCUITPY_ALARM is set. `main.c` uses it to deinit the board before deep sleeping (even when pretending.) Deep sleep is now a two step process for the port. First, the port should prepare to deep sleep based on the given alarms. It should set alarms for both deep and pretend sleep. In particular, the pretend versions should be set immediately so that we don't miss an alarm as we shutdown. These alarms should also wake from `port_idle_until_interrupt` which is used when pretending to deep sleep. Second, when real deep sleeping, `alarm_enter_deep_sleep` is called. The port should set any alarms it didn't during prepare based on data it saved internally during prepare. ESP32-S2 sleep is a bit reorganized to locate more logic with TimeAlarm. This will help it scale to more alarm types. Fixes #3786 |
||
---|---|---|
.. | ||
README.md | ||
board.c | ||
mpconfigboard.h | ||
mpconfigboard.mk | ||
pins.c |
README.md
SparkFun Pro nRF52840 Mini Breakout
The SparkFun Pro nRF52840 Mini small breakout board for Raytac's MDBT50Q-P1M module, which features an nRF52840. It breaks out as many pins as it can in an Arduino Pro Mini footprint. Also included on the board are a qwiic (I2C) connector, LiPo battery charger, and on/off switch.
Note: the SparkFun Pro nRF52840 Mini Breakout does not include a QSPI external flash. Any Python code will need to be stored on the internal flash filesystem.
CircuitPython Pin Defs
CircuitPython pin definitions try to follow those of the Arduino Pro Mini, which the footprint is based on.
This can be somewhat confusing, especially around the analog pins. Here's a quick pin-map:
Board pin label | Digital Pin Reference | Additional Pin Capabilities | Pin/Port Reference |
---|---|---|---|
17 | D1 | TX | P0_17 |
15 | D0 | RX | P0_15 |
8 | SDA | P0_08 | |
11 | SCL | P0_11 | |
19 | D3 | P0_19 | |
20 | D4 | P0_20 | |
21 | D5 | P0_21 | |
22 | D6 | P0_22 | |
23 | D7 | P0_23 | |
9 | D8 | P0_09 | |
10 | D9 | P0_10 | |
2 | D10 | A0 | P0_02 |
3 | D11 | MOSI, A1 | P0_03 |
31 | D12 | MISO, A7 | P0_31 |
30 | D13 | SCK, A6 | P0_31 |
29 | A5 | P0_29 | |
28 | A4 | P0_28 | |
5 | A3 | P0_05 | |
4 | A2 | P0_04 |
If a pin isn't defined as D0, D1, etc., standard port/pin references should work -- e.g. P0_17
is pin 17, P0_02
is pin 2, etc.
Bootloader Notes
The nRF52840 Mini ships with a slightly modified (i.e pin defs and USB defs) version of the Adafruit nRF52 bootloader, which supports UF2 and CDC bootloading.
Hardware Reference
The nRF52840 Mini hardware layout is open source: