STM32H743ZIT6 - Jump to bootloader from application not working for all bootloader versions
We have been using some code to allow jumping into bootloader from the application that has been working well for many years, but has since failed on all our newest batches of PCBs. All PCBs have the same STM32H743ZIT6 processor, all revision V. The only difference is that the jump is working on processors with bootloader version 0x90, but not on boards with version 0x91.
The code for the jump into bootloader is mostly taken from this post.
#define USB
void Bootloader_Jump(void)
{
uint32_t i=0;
void (*SysMemBootJump)(void);
/* Set the address of the entry point to bootloader */
volatile uint32_t BootAddr = 0x1FF09800;
#ifdef USB
__HAL_RCC_USB_OTG_FS_FORCE_RESET();
HAL_Delay(1000);
__HAL_RCC_USB_OTG_FS_RELEASE_RESET();
#endif
/* Disable all interrupts */
__disable_irq();
HAL_DeInit();
/* Set the clock to the default state */
HAL_RCC_DeInit();
/* Disable Systick timer */
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
/* Clear Interrupt Enable Register & Interrupt Pending Register */
for (i=0;i<5;i++)
{
NVIC->ICER[i]=0xFFFFFFFF;
NVIC->ICPR[i]=0xFFFFFFFF;
}
/* Re-enable all interrupts */
__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();
/* Jump is done successfully */
while (1)
{
/* Code should never reach this loop */
}
}The bootloader process is done via USART1. It fails at the Extended Erase Memory command, where instead of taking the time to erase memory then ACK, it resets.

Any idea what could cause this and how it should be fixed?
