Question
How to jump to bootloader from application using STM32U585?
Hi there,
using the STM32U585 I try to jump from application into bootloader. Could somebody please share some code that I could use, instead of this piece that does not do its job?
void JumpToBootloader(void)
{
void (*SysMemBootJump)(void);
volatile uint32_t addr = 0x0BF90000;
HAL_I2C_DeInit(&hi2c1);
HAL_I2C_DeInit(&hi2c2);
USBD_DeInit(&hUsbDeviceFS);
HAL_RCC_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__disable_irq();
SYSCFG->CFGR1 = 0x01;
__DSB();
SysMemBootJump = (void (*)(void)) (*((uint32_t *)(addr + 4)));
__set_MSP(*(uint32_t *)addr);
SysMemBootJump();
}Besides: do I have to pay attention to something special, when using FreeRTOS?
Thanks in advance,
