cancel
Showing results for 
Search instead for 
Did you mean: 

Just one example ... but for STM32L151RDT6 !

JFELI.13
Associate III

At this moment, I am still unable to launch a program from a bootloader.
Can anyone send me a complete file for STM32CubeIde that would allow running a program from a bootloader? Currently the vectors of my program are copied at address 0xC400 (the program starts at 0xC800). 

This doen't work:
bool jump1(uint32_t addr)
{
uint32_t reset_handler_add = *((volatile uint32_t *) (addr+4));
void (*app_reset_handler)(void) = (void*) reset_handler_add;
__HAL_RCC_PWR_CLK_DISABLE();
HAL_RCC_DeInit();
HAL_DeInit();
SysTick->CTRL = 0x0;
SysTick->LOAD=0;
SysTick->VAL=0;
SCB->VTOR = addr;
uint32_t msp_value = *((volatile uint32_t *)addr);
__set_MSP(msp_value);
app_reset_handler();
return true;
}

0 REPLIES 0