Constructing Peripheral Registers from Memory Addresses
Bare-metal programming is all about working directly with the registers in the microcontroller without going through a library, allowing us to gain a deeper understanding of the microcontroller’s capabilities and limitations. This approach enables us to optimize our firmware for speed and efficiency, which are two very important parameters in embedded systems where resources are often limited.
In this chapter, our journey begins with an exploration of various firmware development methodologies, highlighting the different levels of abstraction each offers. We then proceed to learn how to identify the ports and pins associated with key components on our development board. This step is crucial for establishing a proper interface with the microcontroller’s peripherals.
Next, we delve into defining the addresses of some peripherals using the microcontroller’s official documentation. This will allow us to...