This 2-in-1 PR started with the goal of support the Bangle.js 2 smartwatch with *no USB*. * Adds "secure" DFU build support with a committed private key. * Adds 3-bit color support with one dummy bit for the JDI memory display * Allows nrf boards to have a board_background_task() run in RUN_BACKGROUND_TASK. This is needed because the Bangle.js 2 uses the watchdog to reset. * Renamed port_background_task() to port_background_tick() to indicate it runs on tick, not RUN_BACKGROUND_TASK. * Marks serial connected when the display terminal is inited. This means that safe mode messages show up on the display. ACep, 7-color epaper displays also pack 3 bits in 4. So, I added that support as well. * Adds 3-bit ACeP color support for 7-color e-paper displays. (Not watch related but similar due to color depth.) * Allows a refresh sequence instead of a single int command. The 7" ACeP display requires a data byte for refresh. * Adds optional delay after resetting the display. The ACeP displays need this. (Probably to load LUTs from flash.) * Adds a cleaning phase for ACeP displays before the real refresh. For both: * Add dither support to Palette. * Palette no longer converts colors when set. Instead, it caches converted colors at each index. * ColorConverter now caches the last converted color. It should make conversions faster for repeated colors (not dithering.)
CircuitPython port to Spresense
This directory contains the port of CircuitPython to Spresense. It is a compact development board based on Sony’s power-efficient multicore microcontroller CXD5602.
Board features:
- Integrated GPS
- The embedded GNSS with support for GPS, QZSS and GLONASS enables applications where tracking is required.
- Hi-res audio output and multi mic inputs
- Advanced 192kHz/24 bit audio codec and amplifier for audio output, and support for up to 8 mic input channels.
- Multicore microcontroller
- Spresense is powered by Sony's CXD5602 microcontroller (ARM® Cortex®-M4F × 6 cores), with a clock speed of 156 MHz.
Currently, Spresense port does not support Audio and Multicore.
Refer to developer.sony.com/develop/spresense/ for further information about this board.
Prerequisites
Linux
Add user to dialout
group:
$ sudo usermod -a -G dialout <user-name>
Windows
Download and install USB serial driver
macOS
Download and install USB serial driver
Build instructions
Pull all submodules into your clone:
$ git submodule update --init --recursive
Build the MicroPython cross-compiler:
$ make -C mpy-cross
Change directory to cxd56:
$ cd ports/cxd56
To build circuitpython image run:
$ make BOARD=spresense
USB connection
Connect the Spresense main board
to the PC via the USB cable.
Flash the bootloader
The correct bootloader is required for the Spresense board to function.
Bootloader information:
-
The bootloader has to be flashed the very first time the board is used.
-
You have to accept the End User License Agreement to be able to download and use the Spresense bootloader binary.
Download the spresense binaries zip archive from: Spresense firmware v2-4-000
Extract spresense binaries in your PC to ports/spresense/spresense-exported-sdk/firmware/
To flash the bootloader run the command:
$ make BOARD=spresense flash-bootloader
Flash the circuitpython image
To flash the firmware run the command:
$ make BOARD=spresense flash
Accessing the board
Connect the Spresense extension board
to the PC via the USB cable.
Once built and deployed, access the CircuitPython REPL (the Python prompt) via USB. You can run:
$ screen /dev/ttyACM0 115200