circuitpython/ports/nrf/boards/arduino_nano_33_ble
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 initial Arduino Nano 33 BLE board definition 2019-09-26 15:28:57 -04:00
board.c Add `board_deinit` for use with sleep 2020-12-08 10:52:25 -08:00
mpconfigboard.h initial Arduino Nano 33 BLE board definition 2019-09-26 15:28:57 -04:00
mpconfigboard.mk SPIM3 buffer must be in first 64kB of RAM 2020-08-15 10:31:56 -04:00
pins.c initial Arduino Nano 33 BLE board definition 2019-09-26 15:28:57 -04:00

README.md

Arduino Nano 33 BLE and Nano 33 BLE Sense

The Arduino Nano 33 BLE and Arduino Nano 33 BLE Sense and are built around the NINA B306 module, based on Nordic nRF 52840 and containing a powerful Cortex M4F. Both include an onboard 9 axis Inertial Measurement Unit (IMU), the LSM9DS1. The Nano 33 BLE Sense adds an LPS22HB barometric pressure and temperature sensor, an ADPS-9960 digital proximity, ambient light, RGB, and gensture sensor, and an MP34DT05 digital microphone.

Note: the Arduino Nano 33 BLE and BLE Sense do not include a QSPI external flash. Any Python code will need to be stored on the internal flash filesystem.

I2C pins board.SCL1 and board.SDA1 are not exposed and are used for onboard peripherals. Pin board.R_PULLUP must be set to high to enable the SCL1 and SDA1 pullups for proper operation.

Pin board.VDD_ENV applies power to the LSM9DS1, and must be high for it to be operational.

Pins board.MIC_PWR, board.PDMDIN, and board.PDMCLK are for the Nano 33 BLE Sense onboard microphone.

Pin board.INT_ADPS is the interrupt pin from the ADPS-9960.

Pins board.RGB_LED_R, board.RGB_LED_G, and board.RGB_LED_B are the red, green and blue LEDS in the onboard RGB LED.

Pins board.LED_G and board.LED_Y are onboard green and red LEDs. board.LED_Y is also board.SCK.