This chapter describes how a microcontroller §6.1 is prepared for use in the field, with the nRF52 series of Nordic Semiconductor as its example. Provisioning means writing the per-device data that a device needs before deployment, such as identifiers, keys and configuration. The first entries describe the memory areas and controllers involved: the factory information configuration registers §16.2 (FICR), which the chip’s manufacturer programs; the user information configuration registers §16.1 (UICR), which the product’s maker programs; and the non-volatile memory controller §16.3 (NVMC), which erases and writes flash memory §6.6. Next come the protections that stop a debugger from reading the device, access port protection §16.4 and readout protection §16.5, the full erase that removes such protection together with all stored data, how to reprogram a device without erasing the credentials it already holds, and how to provision so that a power failure part-way through leaves the device usable.
The last entries describe tools used in this kind of work: nrfjprog §16.9, Nordic Semiconductor’s command-line tool for programming and erasing its chips through a debug probe; the Z3 §16.10 solver for satisfiability modulo theories; the Keystone assembler engine §16.11, a library that turns assembly text into machine code; PREVAIL §16.12 (Polynomial-Runtime EBPF Verifier using an Abstract Interpretation Layer), a verifier for eBPF §2.1 programs based on abstract interpretation §3.4; TinyCrypt §16.13, a small cryptography library for constrained devices; Bleak §16.14, a Python §12.23 library for Bluetooth Low Energy §7.1 clients; and ctypes, Python’s standard module for calling functions in C libraries.