I’m trying to jump to Bootloader memory (embedded in STMF030xx) from my user application.
The code that I try is as follow:
typedef void (*pFunction)(void);
JumpAddress = *(__IO uint32_t*) (0x1FFFF7A6 + 4);
Jump_To_Bootloader = (pFunction) JumpAddress;
__set_MSP(*(__IO uint32_t*) 0x1FFFF7A6);
It should branch to Bootloader region, but it seems that ‘Hardware fault exception’ instead.
Does anybody could give me a hand in this issue please?
What I’m doing wrong?
Please note that I’m not used with Bootloader issues, neither ‘startup.s’ file type .
I use IAR Workbench.
Thank you in advance!