Modern microcontrollers integrate a number of features that help in building stable and reliable embedded systems. Once the system is up and running, memory and peripherals can be accessed, and basic functionalities are in place. Only then can all the components of the system be initialized by activating the associated peripherals through the system registers, setting the correct frequencies for the clock lines, and configuring and activating interrupts. In this chapter, we describe the interface exposed by the microcontroller to access built-in peripherals and some basic system functionalities. In particular, we focus on the following:
- The interrupt controller
- System time
- Generic timers
- General-purpose I/O
- The watchdog
While these peripherals are often accessible through the hardware-support libraries implemented and distributed by chip manufacturers...