STM32U575QII6 custom bootloader not jumping to my program
Hi All,
I am implementing a custom bootloader on a STM32U575QII6, but it is not jumping to my program.
I have my bootloader in bank 1, and I have written my program to Flash at address 0x08014000 - within the same bank.
I have tried multiple things and followed different posts etc but nothing is working for me. There is nothing specific around the U5 series.
#define APPLICATION_ADDRESS 0x08014000
void (*pFunction)(void) = (void(*)(void)) APPLICATION_ADDRESS + 4;
HAL_RCC_DeInit();
HAL_DeInit();
__disable_irq();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
SCB->VTOR = (uint32_t)APPLICATION_ADDRESS;
__set_MSP(*(uint32_t*) APPLICATION_ADDRESS);
__DSB();
__ISB();
__enable_irq();
(*pFunction)();
Any help would be appreciated, thanks!
