nRF5340 Hardware
Nordic Semiconductor dual-core wireless SoC. The BCI receiver target for zig-syrup-bci.
Cores
| Core |
CPU |
Clock |
Flash |
RAM |
Role |
| Application |
Cortex-M33 + FPU + DSP |
128 MHz |
1 MB |
512 KB |
User logic, DSP, crypto |
| Network |
Cortex-M33 |
64 MHz |
256 KB |
64 KB |
Radio stack, BLE, Thread |
Cores communicate via IPC (inter-processor communication) with shared RAM regions and hardware mutexes.
Radio
- Frequency: 2400-2483.5 MHz (ISM band)
- Protocols: BLE 5.3, Thread 1.3, Zigbee 3.0, ANT, IEEE 802.15.4, proprietary 2.4GHz
- TX Power: -20 to +3 dBm (1 dB steps)
- RX Sensitivity: -98 dBm (1 Mbps BLE), -104 dBm (125 kbps coded PHY)
- Data Rates: 125 kbps, 500 kbps, 1 Mbps, 2 Mbps
- Direction Finding: AoA and AoD (antenna switching)
Key Peripherals
| Peripheral |
Count |
Notes |
| GPIO |
48 pins (P0.0-P0.31, P1.0-P1.15) |
3.3V, 6 mA drive |
| SPI |
4 (SPIM) |
Up to 32 MHz, EasyDMA |
| I2C |
4 (TWIM) |
Up to 400 kHz |
| UART |
4 (UARTE) |
Up to 1 Mbps, EasyDMA, HW flow ctrl |
| ADC |
1 (SAADC) |
12-bit, 8 channels, 200 ksps |
| PWM |
4 |
16 MHz base, 4 channels each |
| PDM |
1 |
Digital microphone interface |
| I2S |
1 |
Audio codec interface |
| QSPI |
1 |
External flash, up to 96 MHz |
| USB |
1 |
Full-speed (12 Mbps), device only |
| Crypto |
1 (CryptoCell-312) |
AES, SHA, RSA, ECC, TRNG |
Power Domains
| Domain |
Voltage |
Peripherals |
| VDD |
1.7-5.5V |
Main supply (internal LDO/DCDC to 1.1V) |
| VDDH |
2.5-5.5V |
High-voltage GPIO, USB |
| DECN |
1.0-1.3V |
Network core internal |
| DECA |
1.0-1.3V |
Application core internal |
Power modes: Active (6 mA), Idle (1 mA), System ON sleep (1.5 µA), System OFF (0.4 µA)
Use DCDC converter for battery operation — drops from ~6 mA to ~3 mA active current.
BCI Receiver Pin Assignment (zig-syrup-bci target)
| Pin |
Function |
Connected To |
| P0.06 |
UART TX |
Debug console |
| P0.08 |
UART RX |
Debug console |
| P0.13 |
SPI SCK |
fNIRS ADC (ADS1299) |
| P0.14 |
SPI MOSI |
fNIRS ADC |
| P0.15 |
SPI MISO |
fNIRS ADC |
| P0.16 |
SPI CS |
fNIRS ADC |
| P0.26 |
I2C SDA |
IMU (LSM6DSO) |
| P0.27 |
I2C SCL |
IMU |
| P1.00 |
GPIO |
LED status |
| P1.01 |
GPIO |
Button (DFU trigger) |
| P1.09 |
ADC AIN5 |
Battery voltage divider |
DFU Bootloader
The nRF5340 uses MCUboot as the default bootloader:
# Build with MCUboot
west build -b nrf5340dk/nrf5340/cpuapp -- -DCONFIG_BOOTLOADER_MCUBOOT=y
# Flash via J-Link
west flash
# DFU over BLE (using mcumgr)
mcumgr --conntype ble --connstring peer_name=nRF5340_BCI image upload app_update.bin
# DFU over USB (using nrfutil)
nrfutil dfu serial -pkg dfu_package.zip -p /dev/cu.usbmodem*
Zephyr RTOS
# Setup
west init -m https://github.com/nrfconnect/sdk-nrf
west update
# Build for application core
west build -b nrf5340dk/nrf5340/cpuapp app/
# Build for network core (BLE controller)
west build -b nrf5340dk/nrf5340/cpunet net/
# Flash both cores
west flash --erase
Key Kconfig Options
CONFIG_BT=y # Enable Bluetooth
CONFIG_BT_PERIPHERAL=y # Peripheral role
CONFIG_BT_DIS=y # Device Information Service
CONFIG_BT_NUS=y # Nordic UART Service
CONFIG_BT_CTLR=y # BLE controller on network core
CONFIG_IPC_SERVICE=y # Inter-core communication
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
Relevant Datasheets
- nRF5340 Product Specification v1.3:
infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340
- nRF5340-DK User Guide:
infocenter.nordicsemi.com/topic/ug_nrf5340_dk
Related Skills
| Skill |
Connection |
| zig-syrup-bci |
BCI receiver firmware target |
| cyton-dongle |
2.4GHz radio comparison (RFDuino vs nRF5340) |
| opennirscap-build |
fNIRS sensor connected via SPI |
| nrf5340-device-interaction |
Software/firmware interaction patterns |
1---2name: nrf5340-hardware3description: Nordic nRF5340 dual-core SoC hardware reference: application core (Cortex-M33 128MHz), network core (Cortex-M33 64MHz), 2.4GHz radio (BLE 5.3, Thread, Zigbee, ANT, 802.15.4, proprietary), GPIO/SPI/I2C/UART pinout, power domains, DFU bootloader. Use when designing BCI receiver firmware, configuring radio parameters, or debugging hardware peripherals.4---56# nRF5340 Hardware78Nordic Semiconductor dual-core wireless SoC. The BCI receiver target for zig-syrup-bci.910## Cores1112| Core | CPU | Clock | Flash | RAM | Role |13|------|-----|-------|-------|-----|------|14| Application | Cortex-M33 + FPU + DSP | 128 MHz | 1 MB | 512 KB | User logic, DSP, crypto |15| Network | Cortex-M33 | 64 MHz | 256 KB | 64 KB | Radio stack, BLE, Thread |1617Cores communicate via IPC (inter-processor communication) with shared RAM regions and hardware mutexes.1819## Radio2021- **Frequency**: 2400-2483.5 MHz (ISM band)22- **Protocols**: BLE 5.3, Thread 1.3, Zigbee 3.0, ANT, IEEE 802.15.4, proprietary 2.4GHz23- **TX Power**: -20 to +3 dBm (1 dB steps)24- **RX Sensitivity**: -98 dBm (1 Mbps BLE), -104 dBm (125 kbps coded PHY)25- **Data Rates**: 125 kbps, 500 kbps, 1 Mbps, 2 Mbps26- **Direction Finding**: AoA and AoD (antenna switching)2728## Key Peripherals2930| Peripheral | Count | Notes |31|------------|-------|-------|32| GPIO | 48 pins (P0.0-P0.31, P1.0-P1.15) | 3.3V, 6 mA drive |33| SPI | 4 (SPIM) | Up to 32 MHz, EasyDMA |34| I2C | 4 (TWIM) | Up to 400 kHz |35| UART | 4 (UARTE) | Up to 1 Mbps, EasyDMA, HW flow ctrl |36| ADC | 1 (SAADC) | 12-bit, 8 channels, 200 ksps |37| PWM | 4 | 16 MHz base, 4 channels each |38| PDM | 1 | Digital microphone interface |39| I2S | 1 | Audio codec interface |40| QSPI | 1 | External flash, up to 96 MHz |41| USB | 1 | Full-speed (12 Mbps), device only |42| Crypto | 1 (CryptoCell-312) | AES, SHA, RSA, ECC, TRNG |4344## Power Domains4546| Domain | Voltage | Peripherals |47|--------|---------|-------------|48| VDD | 1.7-5.5V | Main supply (internal LDO/DCDC to 1.1V) |49| VDDH | 2.5-5.5V | High-voltage GPIO, USB |50| DECN | 1.0-1.3V | Network core internal |51| DECA | 1.0-1.3V | Application core internal |5253**Power modes**: Active (6 mA), Idle (1 mA), System ON sleep (1.5 µA), System OFF (0.4 µA)5455Use DCDC converter for battery operation — drops from ~6 mA to ~3 mA active current.5657## BCI Receiver Pin Assignment (zig-syrup-bci target)5859| Pin | Function | Connected To |60|-----|----------|-------------|61| P0.06 | UART TX | Debug console |62| P0.08 | UART RX | Debug console |63| P0.13 | SPI SCK | fNIRS ADC (ADS1299) |64| P0.14 | SPI MOSI | fNIRS ADC |65| P0.15 | SPI MISO | fNIRS ADC |66| P0.16 | SPI CS | fNIRS ADC |67| P0.26 | I2C SDA | IMU (LSM6DSO) |68| P0.27 | I2C SCL | IMU |69| P1.00 | GPIO | LED status |70| P1.01 | GPIO | Button (DFU trigger) |71| P1.09 | ADC AIN5 | Battery voltage divider |7273## DFU Bootloader7475The nRF5340 uses MCUboot as the default bootloader:7677```bash78# Build with MCUboot79west build -b nrf5340dk/nrf5340/cpuapp -- -DCONFIG_BOOTLOADER_MCUBOOT=y8081# Flash via J-Link82west flash8384# DFU over BLE (using mcumgr)85mcumgr --conntype ble --connstring peer_name=nRF5340_BCI image upload app_update.bin8687# DFU over USB (using nrfutil)88nrfutil dfu serial -pkg dfu_package.zip -p /dev/cu.usbmodem*89```9091## Zephyr RTOS9293```bash94# Setup95west init -m https://github.com/nrfconnect/sdk-nrf96west update9798# Build for application core99west build -b nrf5340dk/nrf5340/cpuapp app/100101# Build for network core (BLE controller)102west build -b nrf5340dk/nrf5340/cpunet net/103104# Flash both cores105west flash --erase106```107108### Key Kconfig Options109110```111CONFIG_BT=y # Enable Bluetooth112CONFIG_BT_PERIPHERAL=y # Peripheral role113CONFIG_BT_DIS=y # Device Information Service114CONFIG_BT_NUS=y # Nordic UART Service115CONFIG_BT_CTLR=y # BLE controller on network core116CONFIG_IPC_SERVICE=y # Inter-core communication117CONFIG_HEAP_MEM_POOL_SIZE=8192118CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048119```120121## Relevant Datasheets122123- nRF5340 Product Specification v1.3: `infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340`124- nRF5340-DK User Guide: `infocenter.nordicsemi.com/topic/ug_nrf5340_dk`125126## Related Skills127128| Skill | Connection |129|-------|-----------|130| zig-syrup-bci | BCI receiver firmware target |131| cyton-dongle | 2.4GHz radio comparison (RFDuino vs nRF5340) |132| opennirscap-build | fNIRS sensor connected via SPI |133| nrf5340-device-interaction | Software/firmware interaction patterns |