STM32 Cube programmer not receiving 0x79 in UART mode
Hello,
I'm working on STM32L051 MCU. I just wanted to enter the device to the bootloader for serial flashing via USART peripheral.
Here is the simple C code to enter into the bootloader for STM32L0xx family MCU.
void JumpToBootloader(void) {
void (*SysMemBootJump)(void);
volatile uint32_t addr = 0x1FF00000;
#if defined(USE_FULL_LL_DRIVER)
LL_RCC_DeInit();
#endif /* defined(USE_LL_DRIVER) */
/**
* Step: Disable systick timer and reset it to default values
*/
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
__disable_irq();
#if defined(STM32L051xx)
SYSCFG->CFGR1 = 0x01;
#endif
SysMemBootJump = (void (*)(void)) (*((uint32_t *)(addr + 4)));
__set_MSP(*(uint32_t *)addr);
SysMemBootJump();
}
and after entering into the bootloader, we can see 0x7f and 0x79 value in RDR and TDR registers of USART as shown below as per the bootloader requirement for USART.
But here in the Cube programmer, it says it is receiving 0x86 and 0xFE respectively but not 0x79 which is sent by the MCU.
I'm unable to understand why there is a mismatch when MCU and the software when data is transmitted. I would be great if anyone helps me resolving this issue.
Thanks!
