-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STM32F4 platform change: add uPortUartWrite() timeout. (#571)
Occasionally, on the ubxlib test farm, we find that uPortUartWrite() on the STM32F4 platform gets stuck because LL_USART_IsActiveFlag_TXE() never returns 1 after a data byte has been written to the UART TX HW with LL_USART_TransmitData8(). It is unclear whether this is occurring because the attached module has pulled the CTS line high irretrievably or is due to some subtle issue on the MCU-side. Anyway, it is not desirable to stop the entire system because of an IO issue and hence the compilation flag U_PORT_UART_WRITE_TIMEOUT_MS (deliberately set to a nice long 30 seconds, since we don't want normal flow control operation to be affected) is introduced in u_port_uart.h and is applied in the STM32F4 implementation of u_port_uart.c. At that time the UART will return the number of characters that have been successfully written to the caller.
- Loading branch information
Showing
2 changed files
with
32 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters