Showing results for 
Search instead for 
Did you mean: 

[STM32L5] OpenBootloader UART errors

Associate III

Hi, I integrated the OpenBootlader for the STM32L552 to my project and it works normally as expected. I'm only using the UART interface and reduced the boot loader project to the minimum.

The problem I'm facing is that sometimes the flashing stops, because the MCU is not acknowledging the messages from the programmer.


This is because the MCU is hanging in the USART receive loop:


  * @brief  This function is used to read one byte from USART pipe.
  * @retval Returns the read byte.
uint8_t OPENBL_USART_ReadByte(void)
  while (!LL_USART_IsActiveFlag_RXNE(USARTx))
//    OPENBL_IWDG_Refresh();

  return LL_USART_ReceiveData8(USARTx);


I tried different UART speeds and the problem is not speed related.
Maybe there is a problem because every single byte is handled for reading? Why there is no DMA or interrupt mechanism implemented?

How can I fix this issues?


Andrew Neil
Evangelist III

Have you checked for UART errors - Framing, etc ?

No errors when the issue occurs: