0
\$\begingroup\$

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).

\$\endgroup\$
1
\$\begingroup\$

The reset vector is the second word (32 bit) in the interrupt vector table. It must be an odd value (thumb bit is set).

\$\endgroup\$
  • \$\begingroup\$ What is the value that is loaded at that location? What does that memory location control? \$\endgroup\$ – AndrewOnFire Mar 11 '15 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 Mar 11 '15 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.