Skip to main content
Visitor II
June 25, 2019
Question

Jump to BOOT ROM area from user application on STM32F0

  • June 25, 2019
  • 1 reply
  • 715 views

I have tried unsuccessfully to jump from the application area to the Boot address.

As much as I try I can not get into boot by software.

What is wrong with my code ?.

SystemInit();

HAL_RCC_DeInit();

SysTick->CTRL = 0;

SysTick->LOAD = 0;

SysTick->VAL = 0;

__set_PRIMASK(1);

__disable_irq();

typedef void (*pFunction)(void);

pFunction Jump_To_Bootloader; 

uint32_t JumpAddress;

JumpAddress = *(__IO uint32_t*) (0x1FFFF6A6 + 4);

 Jump_To_Bootloader = (pFunction) JumpAddress;

 __set_MSP(*(__IO uint32_t*) 0x1FFFF6A6);

 Jump_To_Bootloader();

I'm using stm32F042k6k6. And every time I try to go to the boot address happens

HardFault_Handler

    This topic has been closed for replies.

    1 reply

    Visitor II
    January 21, 2023

    Bump.

    Did you get an answer to this?

    I am having the same problem with STM32F072CB