Jump to the STM32H745 Bootloader from application/user code
Trying to debug why the StLinkv3/Cube isn't bootloading..
According to AN2606, the embedded dfu bootloader for the M7 is in: ITCM-RAM at 0x00000000 (Boot0=0 is FLASH 0x0800 0000)
However, once I jump, I don't see the UART TX line go high, which would indicate the boot loader is running. My guess is that I'm not initializing the addresses correctly... or.. there's a conflict with the M4 that is running. Unfortunately, the BCM4/BCM7 lines are tied high on the board, so I can't disable the M4 which doesn't have any code.
#define FW_ADDR 0
SysMemBootJump = (void(*)(void))(*((u32*)FW_ADDR+4);
static inline __attribute__((always_inline))
void jump ( void )
{
__disable_irq();
HAL_DeInit();
SysTick->CTRL=0;
SysTick->LOAD=0;
SysTick->VAL=0;
__set_PRIMASK(1);
SCB->VTOR = FW_ADDR;
__set_MSP(*(volatile uint32_t *)FW_ADDR);
__set_CONTROL(0);
SysMemBootJump();
}