How to Jump Bootloader(UART1) from Application for STM32F103
I am new to STM32F103
and My goal is to Update Firmware using Bootloader.
but I do not want to use Hardware way as Pin BOOT0.
I want to enter bootloader mode using Backup Register.
here is my code
============================
if (BKP->DR1 != 0) //DR != 0 means, that boot request has been sent
{
uint32_t *stack_ptr = (uint32_t *)FW_ADDR;
__disable_irq(); // Good idea when messing with MSP/VTOR
#if 1
LL_RCC_DeInit();
#elif 0
HAL_DeInit();
#else
//__HAL_RCC_AHB1_FORCE_RESET();
//__HAL_RCC_AHB1_RELEASE_RESET();
#endif
SysTick->CTRL=0;
SysTick->LOAD=0;
SysTick->VAL=0;
__set_PRIMASK(1);
SCB->VTOR = FW_ADDR;
#if 0
__set_MSP(*(volatile uint32_t *)FW_ADDR);
#else
__set_MSP(0x20001000); // Use value found at 0x1FFF0000
#endif
__set_CONTROL(0);
// Call the reset handler (the construct below is 'pointer to a pointer to a function that takes no arguments and returns void')
void (*SysMemBootJump)(void) = (void *)*(volatile uint32_t *)(FW_ADDR + 4);
SysMemBootJump(); // Call it as if it were a C function
}
====================================
But "Flash Loader Demonstrator" says
"Cannot get available commands,..."
If someone has the solution, please share it with me.
Thank you.
