Skip to main content

Check Your Understanding 1.6.3 Check Your Understanding

1.

What does “memory-mapped I/O” mean for the STM32C031C6?
  • Peripheral registers (like GPIO ODR) are placed at specific addresses in the CPU’s address space, so reading and writing them uses the same load/store instructions as accessing ordinary RAM.
  • Correct. The CPU does not need special I/O instructions; a store to 0x5000 0014 changes the GPIO output just as a store to a RAM variable changes that variable.
  • The microcontroller maps the contents of RAM to GPIO pins at startup.
  • No. Memory mapping refers to the address layout of the address space, not to copying RAM contents to pins.
  • GPIO registers are stored in flash memory alongside program code.
  • No. Flash is at 0x0800 0000; GPIO registers are at 0x5000 0000, separate address regions.
  • The IDE maps source-code line numbers to machine instruction addresses.
  • That is debug-symbol mapping, a completely different concept.

2.

List the three steps in the fetch-decode-execute cycle and briefly describe what happens at each step for the instruction GPIOA->ODR |= LED_PIN.