UART DFU on stm32l475
Hi,
I am attempting to jump to system memory to be able to update the firmware via UART. Due to design constraints, BOOT0 pin will not an option for accessing the bootloader thus jumping to system memory within the application is needed.
I'm using the following code to jump to system memory:
__enable_irq();
HAL_RCC_DeInit();
HAL_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();
const uint32_t p = (*((uint32_t*) 0x1FFF0000));
__set_MSP( p );
void (*SysMemBootJump)(void);
SysMemBootJump = (void (*)(void)) (*((uint32_t *) 0x1FFF0004));
SysMemBootJump();In AN2606 there is a note for MCUs that use the dual bank feature, I believe this is the part that is preventing the system from bootloading correctly. I jump to system memory in main() and using STM32CubeProgrammer attempt to connect via UART. However, it timeouts since there is no response from the ST chip.
I've tried this code both on my dev kit and custom hardware with the same result.
Is there a step that I am missing in order to correctly perform a UART DFU?
Thanks,
Tom
