Question
STM32 F0 Reset Handler code question
Posted on January 25, 2016 at 17:53
In the startup_stm32f0xx.s files, at the start of the Reset_Handler procedure, the following code occurs:
;;Check if boot space corresponds to test memory
LDR R0,=0x00000004
LDR R1, [R0]
LSRS R1, R1, #24
LDR R2,=0x1F
CMP R1, R2
BNE ApplicationStart
If the reset vector (address at 0x08000004) lives in the 0x08xxxxxx (flash) or 0x20xxxxxx (RAM), then the CMP R1,R2/BNE ApplicationStart jumps over the clock setup and CFGR1 register setup.
From here, I'm confused. Why would someone build an image with the reset vector in 0x1Fxxxxxxxx memory space? I'm not sure what the comment,
Check if boot space corresponds to test memory
is saying. Does this have to do with the internal bootloader living at 0x1FFFF004? One would not put a reset vector there, would one? Thanks for any clarification as to what the code is doing!