cuprio

Designing a PCB with the nRF52840

The nRF52840 is Nordic Semiconductor's Arm Cortex-M4F wireless microcontroller with 1 MB of flash, 256 kB of RAM, a 2.4 GHz radio for Bluetooth 5 and IEEE 802.15.4, and a full-speed USB controller. It runs from 1.7 to 5.5 V, so it can sit directly on a lithium cell or on USB VBUS. Nordic's advice is to copy its reference circuits and layout closely, especially between the ANT pin and the antenna.

  • 3 min read
  • 5 sections
  • 5 sources
CPU
Arm Cortex-M4 with FPU, 64 MHz
Memory
1 MB flash, 256 kB RAM
Supply
1.7 to 5.5 V (VDD 1.7 to 3.6 V; VDDH 2.5 to 5.5 V)
Radio
Bluetooth 5, IEEE 802.15.4-2006, 2.4 GHz; −20 to +8 dBm TX power
USB
USB 2.0 full speed (12 Mbps); VBUS 4.35 to 5.5 V
GPIO
48 general purpose I/O pins
Packages
aQFN73 7 × 7 mm, QFN48 6 × 6 mm, WLCSP 3.544 × 3.607 mm

Normal or high voltage mode?

The supply mode is set by wiring. Connect the supply to both VDD and VDDH and the chip runs in Normal Voltage mode (1.7 to 3.6 V) using only the REG1 regulator. Connect it to VDDH alone and leave VDD unpowered for High Voltage mode (2.5 to 5.5 V): REG0 then steps VDDH down and its output appears on VDD, where it can feed other parts, up to 25 mA, or 5 mA while transmitting above 4 dBm. REG0 needs at least 0.3 V of headroom, and its output defaults to 1.8 V until the REGOUT0 register in UICR is set to 3.3 V.

The QFN48 package shorts VDD to VDDH and does not bring out the USB pins, so it supports Normal Voltage mode only and no USB. Choose the aQFN73 or WLCSP for USB or direct battery or VBUS supply.

Decoupling and DC/DC inductors

  • Effective decoupling of 2.7 to 5.5 µF on VDD (4.7 µF nominal), 0.7 to 1.3 µF on DEC4, which must be tied to DEC6, and 2.35 to 5.5 µF on DECUSB. Add 100 nF parts next to the VDD pins as in the reference bill of materials, using X7R or X5R ceramics.
  • The regulators start as LDOs. To use the REG1 DC/DC, fit the reference's 10 µH inductor (50 mA minimum) and 15 nH inductor; the REG0 DC/DC adds a second 10 µH inductor (80 mA minimum).
  • Never enable a DC/DC converter without its inductors in place: the device stops working, including debug access, until they are fitted.
  • The 820 pF capacitor shown in the reference circuits is not required on Fxx and later revisions.

Crystals, reset and programming

The radio needs the 32 MHz crystal. Nordic's reference uses a 2016-size part with 8 pF load and ±40 ppm total tolerance, with two 12 pF NP0 capacitors. The 32.768 kHz crystal (9 pF load, ±50 ppm, also with 12 pF capacitors) is optional: the internal RC oscillator gives ±500 ppm, and the crystal is needed only when better accuracy is required.

There is no dedicated reset pin. P0.18 becomes nRESET only when both PSELRESET registers in UICR hold the same value. Programming and debug use SWDCLK and SWDIO, so bring them, ground and VDD to a header. P0.09 and P0.10 double as NFC antenna pins; the UICR NFCPINS setting selects NFC or GPIO use.

USB and RF layout

Feed 5 V USB power to VBUS; if the board runs from USB alone, tie VBUS to VDDH as well. Nordic recommends the optional 2.2 Ω series resistor on VBUS for new designs, for immunity to transients at plug-in, and allows at most 3.8 Ω of source resistance including the cable when VBUS feeds VDDH. Route D+ and D− as a differential pair.

All reference circuits assume a 50 Ω single-ended antenna. Copy the matching network values for your package; for aQFN73 the newer four-component match is recommended for new designs and improves harmonic suppression at 5 dBm and above. Use at least two layers with a ground plane, put a keep-out zone on inner layers under the matching network, give each VSS pin at least one via, and keep 32 MHz crystal traces and fast digital signals away from the antenna line. Pins P1.01 to P1.07 and P1.10 to P1.15 are standard drive, low frequency I/O only, up to 10 kHz.

Common mistakes

Typical faults are a High Voltage mode board left at the default 1.8 V on VDD, so the I/O swings only 1.8 V; a DC/DC enabled in firmware with no inductor fitted; picking the QFN48 for a USB product; and a reworked matching network. Cuprio checks the schematic with electrical rule checks; see how Cuprio designs a board.

Sources

  1. Nordic Semiconductor: nRF52840 Product Specification, key features

    CPU, flash and RAM, supply range, USB, radio standards and TX power, GPIO count, packages

    docs.nordicsemi.com
  2. Nordic Semiconductor: nRF52840 Product Specification, POWER

    Normal and High Voltage modes, VDD and VDDH ranges, REG0 headroom and external current, DC/DC LC filter warning, VBUS range and source resistance, decoupling ranges

    docs.nordicsemi.com
  3. Nordic Semiconductor: nRF52840 Product Specification, Reference circuitry

    Reference circuit configurations and bills of material: DC/DC inductors, crystals and load capacitors, VBUS resistor, RF match; PCB guidelines

    docs.nordicsemi.com
  4. Nordic Semiconductor: nRF52840 Product Specification, Pin assignments

    P0.18 nRESET, SWD pins, QFN48 VDD/VDDH short, low frequency I/O pins

    docs.nordicsemi.com
  5. Nordic Semiconductor: nRF52840 Product Specification, UICR

    PSELRESET, NFCPINS and REGOUT0 default of 1.8 V

    docs.nordicsemi.com
Close view of the two-wheel robot controller, a board designed in Cuprio

Be first in when we open.

Start with 600 welcome credits and get 30% off your first 12 months.