I am trying to program a STM32 L1(51C8Ux) via the standard bootloader and when I do the memory gets written to, but the code doesn't execute (after reset that is). I assume as part of the memory erase, I have overwritten the reset vector. Where does the reset vector reside and what am I supposed to write to it?
I have been referencing RM0038 (Reference manual) and AN3155 (Bootloader command set).
1 Answer 1
The reset vector is the second word (32 bit) in the interrupt vector table. It must be an odd value (thumb bit is set).
-
\$\begingroup\$ What is the value that is loaded at that location? What does that memory location control? \$\endgroup\$AndrewOnFire– AndrewOnFire2015年03月11日 17:45:31 +00:00Commented Mar 11, 2015 at 17:45
-
\$\begingroup\$ RTFM: RM0038, Chapter 10.1.2 "Interrupt and exception vectors". The value points to the first instruction of the startup code, which initialises data memory and calls
main()
. \$\endgroup\$Turbo J– Turbo J2015年03月11日 19:03:25 +00:00Commented Mar 11, 2015 at 19:03