nRF5340 wiring
openaliro/openaliro
Hardware

nRF5340 wiring

Every pin and every connection on the nRF bench stack in one table. Bring-up procedure is in nrf5340-bringup.md.

Source of truth

../ports/nrf5340dk/overlays/dw3000-nfc.overlay remains authoritative, because the build compiles it and it cannot drift. This page adds what a devicetree cannot carry: Arduino header positions, the pin names on the far end, the power rails, and the stack order. If the two disagree, the overlay wins.

Everything below was resolved from the generated build/matter-aliro-door-lock-app/zephyr/zephyr.dts:

  • Header positions from the arduino_header node's gpio-map, where map indices 0 to 5

are A0 to A5 and 6 onward are D0 to D15.

  • Peripheral claims by decoding each psels value, which encodes

(function << 24) | (port * 32 + pin).

  • Chip selects and side-band lines from cs-gpios, irq-gpios, reset-gpios and

wakeup-gpios on the device nodes.

Stack order

X-NUCLEO-NFC12A1 (ST25R300)     NFC front end, SPIM1 @ 4 MHz
        |
Arduino Proto R3                upper patch panel
        |   9 jumpers
Arduino Proto R3                lower patch panel
        |
DWM3000EVB (DW3110)             UWB radio, SPIM4 @ 8 MHz, seated on the DK
        |
nRF5340 DK

The two proto shields are a patch panel. Nothing crosses between them except the jumpers you fit, power included. That is the point: the DWM3000EVB occupies the native Arduino SPI positions D10 to D13, so the NFC board cannot also use them and its signals are re-routed to A2 to A5 on the way up.

The EVB also acts as the spacer that lifts everything above it clear of the DK's P5 and P20 connectors. The vendor documents contact with those connectors as a cause of NFC driver initialization failures.

Every pin and every connection

Read each row left to right as the signal's path up the stack. The DWM Arduino pin is the DK's own header position, carried up through the seated EVB onto the lower proto shield. The step from the DWM Arduino pin to the X-NUCLEO Arduino pin is a jumper between the two proto shields. A dash means the signal stops there.

nRF pinDWM3000EVBDWM Arduino pinX-NUCLEO Arduino pinX-NUCLEO NFC12A1
P0.04pass throughA0--
P0.05pass throughA1--
P0.06pass throughA2D13SCK
P0.07pass throughA3D11MOSI
P0.25pass throughA4D12MISO
P0.26pass throughA5D10CS, active low
P1.00pass throughD0--
P1.01pass throughD1--
P1.04pass throughD2--
P1.05pass throughD3--
P1.06pass throughD4--
P1.07pass throughD5D8RESET, active low, pull-down
P1.08pass throughD6A0IRQ, active high
P1.09RESET, active lowD7--
P1.10IRQ, active highD8--
P1.11WAKEUP, active highD9--
P1.12CS, active lowD10--
P1.13MOSID11--
P1.14MISOD12--
P1.15SCKD13--
P1.02pass throughD14--
P1.03pass throughD15--
railpass through3V33V3VDDIO
railpass through5V5VVBUS
railpass throughGNDGNDground

Nine rows carry a bold pair. Those pairs are the nine jumpers, and nothing else on the stack is wired by hand. Rows where the DWM3000EVB column names a function are the DW3000's own seven signals, taken at the EVB and never carried further up.

Pins reserved by the SoC even though nothing on this stack uses them: P1.00 and P1.01 are UART1 RX and TX, P1.02 and P1.03 are I2C1 SDA and SCL. Do not borrow D0, D1, D14 or D15. Genuinely free: A0, A1, D2, D3, D4.

Two things this table exists to stop:

  • The four SPI jumpers cross headers. The DWM side is analog (A2 to A5), the X-NUCLEO

side is digital (D13, D11, D12, D10). A jumper that looks symmetrical is wrong.

  • The three power jumpers are not optional. The proto shields pass no power through on

their own.

The RESET jumper, DWM D5 to X-NUCLEO D8, is the one value here not taken from either the overlay or a vendor wiring table. The vendor tables omit reset entirely, and reset-gpios is optional in the x-nucleo-nfc binding. D8 on the NFC side is derived from the add-on's own seated overlay, where reset sits on P1.10, which is D8. Confirm against the board pinout before trusting it.

Off-header pins, listed so they are never mistaken for spares: UART0 console on P0.19 to P0.22, LED1 PWM on P0.28, external QSPI flash on P0.13 to P0.18.

Before powering

  • 3.3 V only, never 5 V on the DW3000, and share a common ground with the DK.
  • Set the DWM3000EVB power-select jumper before anything else. The wrong position makes

SPI fail silently, with no device ID and a responder that never listens. This has cost multiple days of debugging on this project. Use the 3.3 V source and read the silkscreen next to the jumper block.

Failure signatures

Console lineMeaning
RFAL: NFC initialization failedNo SPI conversation with the ST25R300. Check the four SPI jumpers (A2 to A5), the RESET jumper (D5), and the three power jumpers. A loose IRQ jumper (D6) usually still lets init pass.
NFC transport start failed then Failed to start Aliro: 1Follows the above. AliroStart() starts the NFC transport first and returns on failure, so BLE advertising never starts either and the reader is silent on air even though Matter still works.
dwt_probe failed: -1, raw DEV_ID=0xffffffffNo SPI conversation with the DW3110. Expected when the EVB is absent. Otherwise check the power-select jumper first, then the EVB's seated contacts on D7 to D13.

Broader SPI and ranging failure modes: troubleshooting.md.