Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
Revision 162:16168a1438f3, committed 2017-04-08
- Comitter:
- funshine
- Date:
- Sat Apr 08 17:03:55 2017 +0000
- Parent:
- 161:2cc1468da177
- Commit message:
- add code to handle serial port rx error in uart_irq()
Changed in this revision
targets/TARGET_STM/TARGET_STM32F3/serial_api.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/targets/TARGET_STM/TARGET_STM32F3/serial_api.c Thu Mar 30 13:45:57 2017 +0100 +++ b/targets/TARGET_STM/TARGET_STM32F3/serial_api.c Sat Apr 08 17:03:55 2017 +0000 @@ -300,6 +300,18 @@ __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); } } + if (__HAL_UART_GET_FLAG(huart, UART_FLAG_PE) != RESET) { + __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF); + } + if (__HAL_UART_GET_FLAG(huart, UART_FLAG_FE) != RESET) { + __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_FEF); + } + if (__HAL_UART_GET_FLAG(huart, UART_FLAG_NE) != RESET) { + __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_NEF); + } + if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) != RESET) { + __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_OREF); + } } }