After erasing the flash of a typical microcontroller with an ARM Cortex, I assume the flash contents to be all ff
.
What is the behavior of the microcontroller after reset, especially that of its processor, in this case?
The only things I am reasonably certain about are these: Upon reset, the inital PC and the initial SP are set to 0xffffffff
.
I am unsure what happens next: Is there an exception because the stack pointer is unaligned? Does the processor fetch an instruction from memory address 0xffffffff
? If the instruction is fetched, is it taken from the two bytes (I think it should be a Thumb instruction because the initial PC has the low bit set) at 0xffffffff
and 0x00000000
or does the instruction fetch access wrap around the "System" section boundary from 0xffffffff
to 0xe0100000
?