Skip to content

nRF5340 (Nordic dual-core wireless SoC) — application core

The nRF5340 pairs a 128 MHz Cortex-M33 application core (1 MB flash, 512 KB RAM) with a 64 MHz Cortex-M33 network core for the BLE / 802.15.4 radio. This LabWired profile models the application core — the half that runs user firmware — to the point that unmodified upstream Zephyr boots and prints over the console.

The defining trait of this profile is its address view. The Zephyr nrf5340dk/nrf5340/cpuapp target is the secure application-core image and uses peripherals at 0x5000_0000 (DT peripheral@50000000), so UARTE0 is 0x5000_8000, TWIM1 is 0x5000_9000, and CLOCK is 0x5000_5000. The separate cpuapp/ns target uses the 0x4000_0000 non-secure aliases; LabWired does not silently treat those two firmware profiles as interchangeable.

Status at a glance

Live status: the table below is a hand-maintained snapshot. For the authoritative, auto-generated view see the validation status and the chip conformance scoreboard.

Aspect Status
Chip yaml configs/chips/nrf5340.yaml
System yaml configs/systems/nrf5340dk.yaml
Reference firmware crates/firmware-nrf5340-zephyr/ (unmodified Zephyr v3.7 hello_world)
Validation Zephyr survival + nrf5340_clock_boot + nrf5340_ficr + nrf5340_gpiote + nrf5340_uicr
Tier sim-validated — real Zephyr boot + behavioural models, no silicon diff

What is proven

Unmodified upstream Zephyr v3.7 samples/hello_world, built for nrf5340dk/nrf5340/cpuapp, boots end to end and prints Hello World! nrf5340dk/nrf5340/cpuapp over the UARTE0 console. The boot walks the genuine Zephyr clock_control (HFCLK/LFCLK start + status poll), nrf_rtc_timer init (RTC1 on LFCLK), the ARMv8-M MPU setup, and the UARTE0 EasyDMA TX path. The entire run is bus-violation-free (LABWIRED_TRACE_VIOLATIONS=1): every address the firmware touches is mapped. A separate integration test attaches the declarative BMI270 model to TWIM1 and reads CHIP_ID 0x24 through a real EasyDMA repeated-START transaction. This proves the board's default I²C controller and the IMU model work together; it does not prove physical signal timing or TrustZone isolation.

The FICR window serves the vendor SVD register file. Its INFO.PART is N5340, and its 4-KiB page size × 256-page code size agrees with the chip profile's 1-MiB flash. The SVD leaves per-device IDs, RAM/FLASH variants, and trim values unspecified; the model preserves those erased values rather than assigning a specific production device.

GPIOTE0 uses the shared Nordic task/event model at the secure SVD address 0x5000D000. The integration gate configures channel 0, triggers TASKS_SET0, and observes the selected bit in the GPIO model's GPIO0.IN input latch. This checks task-to-port readback; external electrical pad routing is not asserted, and this is not a silicon capture.

The UICR window serves the vendor SVD register file in the unprogrammed state: every SVD register reads 0xFFFFFFFF (reserved gaps are not claimed). The SVD gives APPROTECT, SECUREAPPROTECT and ERASEPROTECT a reset value of 0, which its own enums decode as "Protected"; erased NVM reads all ones, so the chip profile overrides those three. An erased part therefore decodes as debugger access protected (not 0x50FA50FA) and ERASEALL unprotected. Writes store directly; NVMC write-enable gating and 1 → 0 flash semantics are not modelled.

Peripherals (from chip yaml)

Peripheral Base (secure cpuapp) Status Notes
Cortex-M33 — ✅ modeled Application core only; network core not modeled
CLOCK / POWER 0x5000_5000 ✅ behavioural Shared nRF Nordic CLOCK model — HFCLK/LFCLK start→started
UARTE0 (console) 0x5000_8000 ✅ behavioural EasyDMA TX → console sink (shared nRF UARTE model)
TWIM1 (I²C) 0x5000_9000 ✅ behavioural EasyDMA I²C; DK route SDA P1.02, SCL P1.03; BMI270 CHIP_ID probe
RTC0 / RTC1 0x5001_4000 / 0x5001_5000 ✅ behavioural RTC1 drives the kernel tick (shared nRF RTC model); counts 32.768 kHz LFCLK, and the CPU-cycle ratio comes from the 128 MHz core clock
TIMER0–2 0x5000_f000 … ✅ behavioural Shared nRF TIMER model; 6 CC each, counted at their 16 MHz PCLK16M base, not the 128 MHz core
GPIO P0 / P1 0x5084_2500 / 0x5084_2800 ✅ modeled nRF GPIO layout (note the unusual 0x_842_500 offset)
DPPIC 0x5001_7000 ✅ bounded model Channel-enable subset; cross-instance routing is not modeled
FICR 0x00FF_0000 ✅ declarative INFO.PART and flash geometry; unspecified device IDs, variants, and trims remain erased
GPIOTE0 0x5000_D000 ✅ behavioral Task/event model; GPIO0.IN task readback is tested; external pad routing and full cross-peripheral DPPI are not claimed
UICR 0x00FF_8000 ✅ declarative SVD register file, erased state; NVMC write gating not modelled
DCNF, SPU, OSC/REG various ⚪ zero stub Three bounded placeholders; reads return zero and writes are dropped. DCNF behavior, TrustZone enforcement, and oscillator/regulator effects are not modeled.
CACHE 0x5000_1000 ⚪ zero stub Zephyr writes CACHE_S.ENABLE at +0x500. Omitting the page faults before the banner; the mapped stub drops the write. Cache effects, counters, invalidation, and erase are not modeled.
IPC_S 0x5002_A000 ⚪ zero stub Zephyr writes RECEIVE_CNF[10] at +0x5B8 during startup. Omitting the page faults before the banner. Channel delivery, event/IRQ routing, GPMEM state, and network-core communication are not modeled.
FPU_S / DCNF_S 0x5000_0000 ⚪ shared page FPU_S is an SVD alternate view of DCNF_S. The single page is mapped as DCNF; the fabricated 0x5000_2000 FPU window was removed after Zephyr booted without it. Neither DCNF nor FPU register behavior is modeled.
CTRL-AP 0x5000_6000 ⚪ zero stub Zephyr writes 0xFF to APPROTECT.DISABLE at +0x544; protection/key and debugger-mailbox behavior are not modeled

Not yet modeled

  • Network core (second Cortex-M33) and the BLE / 802.15.4 radio.
  • TrustZone / SPU access enforcement (the SPU window is a benign stub; the secure/non-secure split is not policed). A secure cpuapp ELF can run, but this is not evidence that an isolation policy or TF-M partition is correct.
  • CTRL-AP — Nordic documents a CPU-side window with debugger mailboxes and access-protection controls. The unmodified Zephyr boot writes one byte to APPROTECT.DISABLE; the current zero stub drops it. Omitting the window faults the boot, while leaving it mapped does not model access protection or debugger communication. The external debug-host/AP path is also absent. See the CTRL-AP omission negative control.
  • Analog trims — the FICR trim table and UICR remain erased, and OSCILLATORS/REGULATORS behavior is not modeled, so oscillator/radio calibration is absent. The 0x5002A000 page is IPC_S in the vendor SVD; the startup write to RECEIVE_CNF[10] is accepted only by an address-only stub. This is irrelevant to the digital console path but means RF/analog fidelity and IPC behavior are not represented.
  • No live silicon diff — there is no nRF5340 bench board, so the models are validated against real firmware behaviour, not a register capture.

Rebuilding the fixture

See crates/firmware-nrf5340-zephyr/README.md. build.sh rebuilds the committed ELF from a Zephyr v3.7 west workspace using the gnuarmemb toolchain (no Zephyr SDK required).