cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any solution to jump to application from the internal bootloader with BOOT0 pin connected to VDD

MBen .1
Associate II

I'm using STSPIN32F0A witch is based on STM32F031C6 MCU and in my case BOOT0 pin is always connected to the VDD to force the board to boot on system memory, and the idea is to jump from the bootloader to the application on the main flash using the bootloader GO command.

0693W000003PRyUQAW.png

the problem is, when i run the GO command the sequence seems to be correct and I get the ACK as expected but the program does not jump to the application, but instead he goes back to bootloader again.

Here a screen shot of what happens from host side:

0693W000003PRsMQAW.png

i start the communication with the bootloader with 0x7F and i get the ACK (0x79)

after that i sent the Go command (0x21 0xDE ) and i got the ACK (0x79) and then i send the address (0x08000000) with 0x08 as checksum and i got the ACK.

what i assume is that the program should jump to the memory address received in the Go command without reseting the board.

4 REPLIES 4

Your app would need to remap flash so the vector table works properly​.

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

Hi @Community member​ , could you please explain to me why the app need to remap flash ? thanks

Because the ROM's vector table is in effect, and all the interrupts are going through it, and not your code.

You can't reprogram the VTOR register on the CM0, so whatever memory is mapped at zero (ROM, FLASH, RAM) is what is used.

The IWDG watchdog might also be running, if that is the case you'll need to keep kicking that.

I'm not actively using F0 parts.

 /* Enable the SYSCFG peripheral clock*/

 __HAL_RCC_SYSCFG_CLK_ENABLE();

 /* Remap FLASH at 0x00000000 */

 __HAL_SYSCFG_REMAPMEMORY_FLASH();

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

Thank you @Community member​ it works fine now, I am able to jump to my application after remapping the flash even with BOOT0=1.