AnsweredAssumed Answered

STM32F4 - Jump from Boot to App

Question asked by brianN on May 5, 2016
Latest reply on May 5, 2016 by Clive One
Hey guys, my first step in creating a bootloader was simply to move the app (which resided at 0x8000000 to 0x8020000 through the linker file. Next, I created a basic bootloader at address 0x8000000 which basically does this:

__disable_irq();
__HAL_RCC_SYSCFG_CLK_ENABLE();
SYSCFG->MEMRMP=1;
__set_MSP(*(__IO uint32_t*) (0x8020000));
     
(pFunction)=( void(*)(void)) (*((uint32_t *) (0x8020000 + 4)));

SCB->VTOR = 0x8000000 + 0x20000;     

So far, this seems to work as I can step through my application code, I can see it start at 0x800 and then jump to 0x802 and then my software units begin to go through their init. What doesn't work is when my application hits HAL_Delay(), it just spins forever....Does this imply my clock is not running or interrupts are disabled? Its odd to me because I am calling my application init functions so I know I am setting up the micro ok, but once I move it to 0x8020000, it doesn't work....Any ideas?

Outcomes