cancel
Showing results for 
Search instead for 
Did you mean: 

stm32l4xx_hal_uart_ex.c 'hangs' in insane long timeout when constructing Serial

Rob Vlaar
Associate
Posted on July 11, 2018 at 14:08

Description

type: bug

Bug

Target

STM32L476

Files

stm32l4xx_hal_uart_ex.c

stm32l4xx_hal_uart.c

mbed-os

5.8.1

Issue

When we want to construct a serial object, it 'hangs' when it is waiting on `USART_ISR_REACK` to become high in `HAL_UARTEx_StopModeWakeUpSourceConfig`. In the timeout` UART_WaitOnFlagUntilTimeout` it is waiting for 0x1FFFFFFU ticks before leaving the timeout since the REACK flag isn't being triggered. We also tested this issue with the STM32L072RZ but this has a timeout of just 0x1000. With the L072 it also runs into it's timeout because the REACK flag isn't being triggered aswell, but this timeout continues after just 1000 ticks. Changing the 0x1FFFFFFU timeout to 0x1000 'fixes' the issue.

Questions

  • Why is the timeout so exceedingly long?
  • Why is it even waiting for the `USART_ISR_REACK` since it never becomes high?
  • Should the timeout be changed to 0x1000 aswell?

--note, i have also placed this topic on the github of mbed

0 REPLIES 0