circuitpython/ports/nrf/boards/sparkfun_nrf52840_mini
Scott Shawcroft 40118bcf57
Add `board_deinit` for use with sleep
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
2020-12-08 10:52:25 -08:00
..
README.md Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
board.c Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
mpconfigboard.h wip 2019-12-05 22:45:53 -05:00
mpconfigboard.mk remove unnecessary board configuration and address feedback 2020-10-11 22:42:59 -07:00
pins.c Reorganize board busses into shared-bindings and shared-module. 2019-04-08 16:58:50 -07:00

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 labelDigital Pin ReferenceAdditional Pin CapabilitiesPin/Port Reference
17D1TXP0_17
15D0RXP0_15
8SDAP0_08
11SCLP0_11
19D3P0_19
20D4P0_20
21D5P0_21
22D6P0_22
23D7P0_23
9D8P0_09
10D9P0_10
2D10A0P0_02
3D11MOSI, A1P0_03
31D12MISO, A7P0_31
30D13SCK, A6P0_31
29A5P0_29
28A4P0_28
5A3P0_05
4A2P0_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: