Subsection 7.1.6 Part 3c: The Register That Was Not Zero
Blinky’s next two lines, the ones you have not stepped yet (Subsection 7.1.5), configure PA5 as an output. Before stepping them, expand
GPIOA and look at GPIOA_MODER, and look closely, because the value is not zero: it reads 0xEBFFFFFF, and nearly every MODE field, including MODE5 for our LED pin, holds 0x3 (Figure 7.1.9).

Why? This is a question for the reference manual, and it is one you have looked up before: in the Day 3 activity you went to RM0490 §6.4.1 for MODER’s power-on default. The answer (Figure 7.1.10): the reset value is 0xEBFF FFFF for port A and 0xFFFF FFFF for every other port: pins wake up in analog mode (
11), the high-impedance do-nothing state you saw when configuring the ADC. Today you are watching that sentence of the manual be true on live hardware.
And the
EB at the top of port A’s value? Two pins do not reset to analog: PA13 and PA14 wake up in alternate-function mode. They are SWDIO and SWCLK, the serial wire debug port. The debugger you are using at this very moment is connected through those two pins, and if they reset to analog like the rest, a fresh chip could never be debugged.

Now step through the two MODER lines and watch
MODE5 go from 0x3 (analog) to 0x1 (output, Figure 7.1.11), and notice it takes both lines to get there: |= (1U<<10) alone would leave 11 as 11, which is exactly why Blinky clears bit 11 explicitly. Notice also what you just did: you audited a register write: every bit the code claims to set, read back set. This works on any register, in any program.

