cancel
Showing results for 
Search instead for 
Did you mean: 

SysTick does not run when the FLASH start address is not equal to 0x08000000

Waller.George
Associate III

I'm building an application where the flash is divided to facilitate firmware upgrades from a self written bootloader. If I try and run run the code without the bootloader on the MCU with the start address 0x08008000 the SysTick does not run. I assume none of my interrupt will fire as the vector table isn't in the right place. The examples ST offers for launching applications from bootloaders is very vague and does not mention anything about this. Simply set the MSP, cast your flash address to a function pointer and call it.

Is there anything else I should be doing? Any pointers would be great.

Thanks

5 REPLIES 5

You said it - vector table. You should relocate it. Read about it in Programmer's Manual of your microcontroller. The register is called SCB->VTOR.

See example projects here:

 https://www.st.com/en/embedded-software/x-cube-iap-usart.html

 Also read its accompanying application note (AN4657) - https://www.st.com/resource/en/application_note/dm00161366.pdf

Usually addressed by a constant in SystemInit(), better to use a symbol and let the linker fix-up

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Waller.George
Associate III

Thanks guys, got it.

Piranha
Chief II

Also check out my solution here:

https://community.st.com/s/question/0D50X0000AFpTmUSQV/using-nvicsystemreset-in-bootloaderapplication-jumps

Additionally to that VTOR should be set in application code also. It should be done at least for debugging purposes, if debugger starts execution from application base address and therefore bootloader is not executed.

Waller.George
Associate III

I'm having another problem now. It doesn't seem to matter which application I load it always crashes in the following startup code at the adds instruction. I have no idea why this is the case. Again any ideas of where to look for the problem would be great, thank you.

__libc_init_array:
...
 
...
adds  r6, #1
...