Question
STM32H7 UART1 bootloader fails after TouchGFX init
Hi,
MCU : STM32H743ZI
TouchGFX : 4.18.1
After I execute HAL::initialize(), my jump doesn't work anymore, I do get in the bootloader but the USART1 bootload doesn't ACK my requests. If I jump before HAL::initialize it does work. I tried to look at the register modified during HAL::initialize but I found nothing relevant and I do not have access to the code.
In TouchGFX code "TouchGFXGeneratedHAL.cpp" :
void TouchGFXGeneratedHAL::initialize()
{
// BOOTLOAD jump working ok here
HAL::initialize();
// BOOTLOAD jump fails hereMy jump code :
void Bootloader_Jump(void)
{
uint32_t i=0;
void (*SysMemBootJump)(void);
volatile uint32_t BootAddr = 0x1FF09800;
MODIFY_REG(RCC->D2CCIP2R, RCC_D2CCIP2R_USART16SEL, (uint32_t)(0U));
__disable_irq();
SysTick->CTRL = 0;
HAL_RCC_DeInit();
for (i=0;i<5;i++)
{
NVIC->ICER[i]=0xFFFFFFFF;
NVIC->ICPR[i]=0xFFFFFFFF;
}
__enable_irq();
/* Set up the jump to booloader address + 4 */
SysMemBootJump = (void (*)(void)) (*((uint32_t *) ((BootAddr + 4))));
/* Set the main stack pointer to the bootloader stack */
__set_MSP(*(uint32_t *)BootAddr);
/* Call the function to jump to bootloader location */
SysMemBootJump();
while (1)
{
/* Code should never reach this loop */
}
}Any ideas to make it work ?
