This chapter describes the hardware and system software of small embedded devices, with the Arm Cortex-M4 §6.3 processor, the nRF52840 §6.4 microcontroller §6.1 and the Zephyr real-time operating system §6.33 as examples. It begins with the parts of a microcontroller and its memories, then the hardware that confines code: the memory protection unit §6.8, the memory management unit §6.9 that larger processors have instead, and privilege levels §6.10. Next come interrupts §6.11 and their handlers, faults, watchdog timers §6.16, resets and power loss, and the clocks and counters with which a device measures time, including how those clocks drift and how counters wrap around.
The middle of the chapter covers the interfaces through which engineers observe and control a device: general-purpose pins, serial ports, USB, and the debug ports and tools that can halt the processor and rewrite its memory. It then explains how a device starts, through bootloaders §6.30, secure boot §6.31 and measured boot §6.32. The last entries describe Zephyr itself, its threads, work queues §6.36 and scheduling rules, what makes a requirement a real-time requirement, and how drivers, hardware descriptions and build options assemble one firmware image.