nRF52840 (Cortex-M4, Firmware)
Runs real firmware (Zephyr ELF / Intel HEX) on an ARM Cortex-M4 emulator; GPIOs drive the analog circuit.
Key data
- Category
- ICs
- Simulation model
- Microcontroller with real firmware
- Manufacturer part number
- nRF52840-QIAA
- Reference prefix
- U
- Pins
- 50
- Land pattern
- BMD-340_UBLOX_LGA68
Notes
The firmware runs on an emulated CPU core, instruction by instruction. Peripherals that the model implements (GPIO, timers, UART, SPI, I²C, ADC and others, see the description) act on the pins of the circuit, so the analog parts around the chip see the same voltages and timing as on a real board.
- Right-click the part and choose "Open in code editor" to write and compile its code; "Serial monitor" shows its UART output.
- In the inspector you can load a demo firmware or your own ELF / Intel HEX / BIN file instead.
- GPIO pins are real circuit pins: an LED on an output needs a series resistor, an input needs a defined level (pull-up or pull-down).
- The debugger in the code view stops at breakpoints and shows registers, variables and the call stack.
Simulation model
An emulated CPU core runs the firmware binary instruction by instruction. The GPIO pins are pins of the analog circuit: outputs drive through a driver resistance, inputs read the voltage with thresholds.
- Device
- nrf52840
- CPU core
- ARM Cortex-M4F
- Emulator
- ARM Cortex-M emulator
- Firmware
- Bare-metal C (arm-none-eabi-gcc) or a Zephyr project in the code view, or your own ELF / Intel HEX / BIN file
- Flash / RAM for firmware
- 1 MB / 256 KB
- Supply pins
- VDD / GND
- Mapped GPIO pins
- 48
Pins 50
simulatedreal chip onlyPin functions from the emulator and the datasheet.
| Pin | Name | Functions | Use |
|---|---|---|---|
| VDD | VDDSupply pin | Supply 1.7–3.6 V: decoupling per the reference circuit | |
| GND | GNDGround pin | Ground | |
| P0.00 | P0.00I/O pin | XL1 | 32.768 kHz crystal (XL1/XL2) for the low-power clock, or GPIO |
| P0.01 | P0.01I/O pin | XL2 | 32.768 kHz crystal (XL1/XL2) for the low-power clock, or GPIO |
| P0.02 | P0.02I/O pin | AIN0 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P0.03 | P0.03I/O pin | AIN1 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P0.04 | P0.04I/O pin | AIN2 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P0.05 | P0.05I/O pin | AIN3 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P0.06 | P0.06I/O pin | UART0 TX on the nRF52840 DK (Zephyr console) | |
| P0.07 | P0.07I/O pin | TRACECLK | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) |
| P0.08 | P0.08I/O pin | UART0 RX on the nRF52840 DK (Zephyr console) | |
| P0.09 | P0.09I/O pin | NFC1 | NFC antenna (NFC1/NFC2); usable as GPIO after disabling NFC in UICR |
| P0.10 | P0.10I/O pin | NFC2 | NFC antenna (NFC1/NFC2); usable as GPIO after disabling NFC in UICR |
| P0.11 | P0.11I/O pin | Button 1 on the nRF52840 DK (to GND, pull-up) | |
| P0.12 | P0.12I/O pin | Button 2 on the nRF52840 DK (to GND, pull-up) | |
| P0.13 | P0.13I/O pin | LED1 on the nRF52840 DK (active low) | |
| P0.14 | P0.14I/O pin | LED2 on the nRF52840 DK (active low) | |
| P0.15 | P0.15I/O pin | LED3 on the nRF52840 DK (active low) | |
| P0.16 | P0.16I/O pin | LED4 on the nRF52840 DK (active low) | |
| P0.17 | P0.17I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P0.18 | P0.18I/O pin | RESET | Pin reset when enabled in UICR (Zephyr default on the DK); otherwise GPIO |
| P0.19 | P0.19I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P0.20 | P0.20I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P0.21 | P0.21I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P0.22 | P0.22I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P0.23 | P0.23I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P0.24 | P0.24I/O pin | Button 3 on the nRF52840 DK (to GND, pull-up) | |
| P0.25 | P0.25I/O pin | Button 4 on the nRF52840 DK (to GND, pull-up) | |
| P0.26 | P0.26I/O pin | I²C SDA on the Arduino header of the nRF52840 DK | |
| P0.27 | P0.27I/O pin | I²C SCL on the Arduino header of the nRF52840 DK | |
| P0.28 | P0.28I/O pin | AIN4 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P0.29 | P0.29I/O pin | AIN5 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P0.30 | P0.30I/O pin | AIN6 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P0.31 | P0.31I/O pin | AIN7 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| P1.00 | P1.00I/O pin | SWO | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) |
| P1.01 | P1.01I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.02 | P1.02I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.03 | P1.03I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.04 | P1.04I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.05 | P1.05I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.06 | P1.06I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.07 | P1.07I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.08 | P1.08I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.09 | P1.09I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.10 | P1.10I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.11 | P1.11I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.12 | P1.12I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| P1.13 | P1.13I/O pin | SPI MOSI on the Arduino header of the nRF52840 DK | |
| P1.14 | P1.14I/O pin | SPI MISO on the Arduino header of the nRF52840 DK | |
| P1.15 | P1.15I/O pin | SPI SCK on the Arduino header of the nRF52840 DK |
Parameters 1
packagePCB
BMD-340_UBLOX_LGA68| Package | Land pattern | Status | Source |
|---|---|---|---|
| BMD-340 · BMD-340-A-R | BMD-340_UBLOX_LGA68 | Verified land pattern | u-blox BMD-340 data sheet UBX-19033353 R13 §5.2 (pad map and land pattern), VCC + VCCH tied for normal-voltage mode (§4.3); antenna keep-out §6.1 |
| aQFN73 · nRF52840-QIAA-R | Nordic_AQFN-73-1EP_7x7mm_P0.5mm | Draft: check before production | KiCad 10.0.7 library: symbol nRF52840 (pin numbers), footprint Package_DFN_QFN:Nordic_AQFN-73-1EP_7x7mm_P0.5mm (IPC-7351B land pattern) |
Needs: bare nRF52840 (aQFN-73, 0.5 mm, via-in-pad): needs the reference circuit from the product specification (32 MHz crystal on XC1/XC2, decoupling DEC1…DEC6, inductors on DCC/DCCH, RF matching and antenna on ANT). For hobbyists use a module (e.g. u-blox BMD-340). | |||