SearchA-ZF › Adafruit Feather nRF52840 Express

Adafruit Feather nRF52840 Express

2019 Open source · CC0 On-board only Online

The Adafruit Feather nRF52840 Express is a Feather-format development board built on a Nordic nRF52840 (a 64 MHz ARM Cortex-M4F, ARMv7E-M with an FPU, with 1 MB flash and 256 KB RAM plus a Bluetooth Low Energy radio) — emulated from scratch in the browser on this site's shared ARM core. It runs REAL compiled firmware: a flat flash image with the ARM vector table at 0x00000000 boots exactly as on silicon (SP and PC loaded from the table), then drives the real nRF52840 registers. The on-board surface a Feather actually exposes is shown — the single WS2812 NeoPixel on P0.16 (decoded from the real bit-banged 800 kHz line), the red user LED on P1.15 and the blue CONN LED on P1.10, the USER switch on P1.02, and a UARTE0 serial console — with nothing invented: no breadboard, no fake audio (a bare Feather has no speaker, so it is honestly silent). Because the whole chip is ordinary JavaScript, it plugs into this site's shared debugger: the real Thumb-2 disassembler, live r0-r15 / xPSR / N-Z-C-V, side-effect-free FLASH / RAM / APB / GPIO memory at the real addresses, single-instruction step, execution breakpoints and write-watchpoints.

Adafruit Feather nRF52840 Express (product 4062) ↗

Runs on: Web browser

Adafruit Feather nRF52840 Express Online Emulator

Play Adafruit Feather nRF52840 Express using JavaScript directly in your browser.

Configurations

ConfigurationEmulatorMachineOSLegal
Blink (red + blue LEDs)Adafruit Feather nRF52840 ExpressAdafruit Feather nRF52840 ExpressopenOpen ⛶
NeoPixel RainbowAdafruit Feather nRF52840 ExpressAdafruit Feather nRF52840 ExpressopenOpen ⛶
UART Hello + CounterAdafruit Feather nRF52840 ExpressAdafruit Feather nRF52840 ExpressopenOpen ⛶
ButtonAdafruit Feather nRF52840 ExpressAdafruit Feather nRF52840 ExpressopenOpen ⛶

Chips

Notes

Embedding

This is a two-layer stack: a real ARM CPU core underneath, and a from-scratch nRF52840 SoC + Feather Express board on top. It loads real Cortex-M4 flash images and runs them on the actual on-chip peripherals — the CLOCK block, GPIO P0/P1, the UARTE0 serial port and RNG — at their real addresses. The bundled programs are genuine bare-metal firmware compiled with clang for thumbv7em, driving the real hardware paths, not a shim.

  • The CPU. cortex-m7.js executes Thumb-2. The real chip is a Cortex-M4F (ARMv7E-M); this core is ARMv7-M, the same instruction-architecture family, so it runs the M4 image unchanged (these images are built soft-float, so no VFP init is needed).
  • Real reset. The image is a real flash image with the ARM vector table at 0x00000000: on reset the board loads SP from word 0 and PC from word 1, exactly like the silicon.
  • The board, in JavaScript. feather-board.js maps FLASH/RAM/APB/GPIO at their real nRF52840 addresses, answers the CLOCK ready bits, decodes the WS2812 waveform the program bit-bangs on P0.16 into a live RGB NeoPixel, feeds the USER switch in on its GPIO pin, and copies every UARTE0 EasyDMA transfer into the serial console.
PieceKindWhat it does
Feather.create(canvas)factoryBuild the ARM core + the nRF52840 memory map + peripherals.
load(bytes) / reset()methodCopy the flat image into FLASH; reset loads SP/PC from the vector table at 0.
runFrame()methodStep ~180k instructions and latch any completed NeoPixel frame.
setButton(down) / getSerial()inputDrive the USER-switch GPIO level; read the accumulated UARTE0 output.
present()methodDraw the NeoPixel, the two on-board LEDs and the serial console.

Debugger integration

feather-debug.js reads window.EMU_BOOT and hands the shared debugger a genuine ARM Cortex-M4F machine — the same core the firmware runs on, exposed instruction-accurately.

  • Registers. registers() reads r0-r12, SP, LR, PC, xPSR and the APSR flags N/Z/C/V live each refresh; each has a set() that writes straight back into the core's register file.
  • Disassembly. FLASH is decoded with the shared cortex-m7 decoder (the Thumb-2 disassembler), so the code window shows real ARM mnemonics at the reset address 0x00000000.
  • Single-step. Step calls transport.stepInsn, which advances the core exactly one Thumb instruction; watch the WS2812 bit-bang toggle the GPIO OUT register on P0.16 as you step through the NeoPixel driver, or the reset handler zero .bss and fall into main().
  • Breakpoints & watchpoints. Execution breakpoints are a PC set the run-loop checks before each instruction; write watchpoints wrap the board's memory-write path and pause when a watched address is written (e.g. the P0 OUTSET at 0x50000508 or the UARTE0 TXD.PTR at 0x40002544). Both are real.
  • Memory map. Four chips read the real address space side-effect-free: FLASH (program, disassembled at 0), RAM (0x20000000), the APB block (0x40000000 — CLOCK / UARTE0 / TIMER0 / RNG) and the GPIO block (0x50000000 — watch P0 and P1 OUT/DIR/IN).

Architecture

The Adafruit Feather nRF52840 Express is a Feather-format development board built on a Nordic nRF52840 — a 64 MHz ARM Cortex-M4F with 1 MB flash and 256 KB RAM, plus Bluetooth Low Energy radio. This build models the SoC from scratch on the shared ARM core and wires the on-board surface a Feather actually exposes.

  • Cortex-M4F CPU — runs the real Thumb-2 image. FLASH is at 0x00000000 (the vector table: word0 = initial SP, word1 = reset handler), RAM at 0x20000000, the APB peripherals at 0x40000000 and the GPIO ports at 0x50000000. On reset SP and PC are loaded from the vector table, exactly as on silicon.
  • NeoPixel (real WS2812 decode). The board carries one on-board SK6812 NeoPixel on P0.16 (with power on P1.14). A program clocks it by bit-banging the WS2812 800 kHz protocol — each bit is a HIGH pulse (long = 1, short = 0) then a LOW gap, and a long LOW latches the frame. The board watches the GPIO OUT edges on P0.16, measures each HIGH pulse in executed instructions to recover the bit, packs 24 bits (G,R,B) and lights the live RGB value. This is the genuine line protocol, decoded — not a framebuffer poke.
  • LEDs. The red user LED is on P1.15 and the blue CONN LED on P1.10, both active-HIGH (lit when the pin is driven high). The board reads the GPIO OUT/DIR of P1 to light them.
  • USER switch. The on-board switch (SW1, shared with DFU) is on P1.02, active-LOW with a pull-up: released reads 1, pressed reads 0. The Controller panel drives that input level; the firmware reads it from the GPIO IN register.
  • UARTE0 (serial console). The nRF52840's UARTE0 at 0x40002000 with the TX pin on P0.25. A program sets TXD.PTR/TXD.MAXCNT and triggers STARTTX; the board performs the real EasyDMA transfer — copying that buffer out of memory into the on-screen serial console and raising ENDTX — so real polling UART code runs to completion.
  • Clocks + RNG. The CLOCK block answers HFCLKSTARTED/LFCLKSTARTED so bring-up spins fall through; RNG returns bytes on demand; a free-running TIMER0 counts executed instructions. The programs run on the emulator's instruction rate as the time base.
  • Content. Four original CC0 bare-metal programs compiled with clang for thumbv7em: NeoPixel Rainbow (default), Blink, UART Hello + Counter and Button. No proprietary firmware is used.
  • Honest limits. A bare Feather nRF52840 Express has no on-board speaker, so this emulator is genuinely silent with no sound path. The BLE/802.15.4 radio, USB, QSPI flash, I2C/SPI and the interrupt-driven paths of the peripherals are not modelled — the bundled firmware polls. This is bare-metal firmware, not the CircuitPython/Arduino BSP runtime.