← Back to the chapter · Previous detail
Technical detail · Microcontroller Programming: Setup and GPIO
Peripheral transfers and evidence
An AES accelerator is hardware that performs parts of the Advanced Encryption Standard cipher. UART and the AES accelerator are peripherals that software configures and observes.
Most MCU peripherals are controlled through registers exposed in the processor memory map. A GPIO block, ADC, SPI, I2C controller, UART, AES accelerator, or timer usually owns an address range; the driver writes configuration fields, starts the operation, then reads status or data, polls a pending flag, or waits for an interrupt. Small transfers, such as one UART byte or one ADC sample, can be handled directly. Larger or faster transfers should consider DMA: configure a buffer, count, and peripheral trigger, let the engine move the block, then handle one completion interrupt. That avoids waking the CPU for every byte or sample, but it creates a buffer-ownership contract that must be measured and documented.
Those differences do not remove the beginner model; they make its evidence more important. A safe interrupt path records only the event that must not be missed and leaves serial printing, network sends, memory allocation, and long calculations outside the ISR. A safe timer path proves that elapsed-time comparisons survive counter wraparound and do not assume a fixed loop speed. A safe ADC or serial path treats buffers, conversion time, baud rate, and reference voltage as part of the firmware contract. When the loop is treated as a scheduler, the prototype can grow without every new feature becoming another blocking delay. These constraints also explain why examples that work alone can fail when combined without timing budgets.