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

asked Mar 11, 2015 at 14:44
\$\endgroup\$

1 Answer 1

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

answered Mar 11, 2015 at 15:53
\$\endgroup\$
2
  • \$\begingroup\$ What is the value that is loaded at that location? What does that memory location control? \$\endgroup\$ Commented 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\$ Commented Mar 11, 2015 at 19:03

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.