The main stack pointer (MSP) holds the active main-stack address. On reset, a Cortex-M processor loads its initial value from the first vector-table entry, then loads the reset-handler address from the second and transfers control to it. section 1.2.1 section 4.2.1
Treat the initial MSP entry as essential startup configuration:
- It is a RAM address marking the start of the stack region, not a function pointer. An absent, misaligned, or incorrect entry can prevent boot or cause unpredictable behavior. section 4.2.4
Figure 4.3 MCU boot sequence
The MCU boot-sequence figure helps locate MSP initialization within reset startup. section 4.2.1
