zephyr/drivers/serial
Dawid Niedzwiecki 4a2a512c11 drivers: serial: fix STM32 async uart driver
Fix a bug that causes not handling an IDLE line detection interrupt for
some STM chips, e.g. STM32F412. It impacts the async UART
communication - an information that data have been recieved is lost.

The issue occurs when the IDLE flag is set during handling another UART
interrupt, e.g Transmission complete. The ISR calls uart_stm32_err_check
function, which clears the noise error flag with LL_USART_ClearFlag_NE
without any additional checks. Unfortunately, clearing the noise flag
also clears the IDLE flag for some chips(an read to the USART_SR
register followed by a read to the USART_DR register for STM32F412
clears PE, FE, NF, ORE and IDLE flags), hence the ISR is not called
again for the IDLE event. The IDLE flag is no longer set.

Add checking the noise flag before clearing it.

Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com>
2023-01-04 10:33:49 +01:00
..
CMakeLists.txt drivers: serial: Add Driver for CDNS UART IP6528 2022-12-12 12:19:35 -05:00
Kconfig drivers: serial: Add Driver for CDNS UART IP6528 2022-12-12 12:19:35 -05:00
Kconfig.altera_jtag drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.apbuart drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.b91 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.cc13xx_cc26xx drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.cc32xx drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.cdns drivers: serial: Add Driver for CDNS UART IP6528 2022-12-12 12:19:35 -05:00
Kconfig.cmsdk_apb drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.esp32 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.gd32 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.gecko drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.imx drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.it8xxx2 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.leuart_gecko drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.litex drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.lpc11u6x drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.mcux drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.mcux_flexcomm drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.mcux_iuart drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.mcux_lpsci drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.mcux_lpuart drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.miv drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.msp432p4xx drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.native_posix drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.neorv32 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.npcx drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.nrfx drivers: serial: nrf: Tweak default values for workaround 2022-08-11 12:15:11 +02:00
Kconfig.ns16550 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.numicro drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.pl011 drivers: serial: pl011: Remove unused Kconfig symbols 2022-07-21 16:40:28 +00:00
Kconfig.psoc6 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.ql_usbserialport_s3b drivers: serial: Add QuickLogic USBserialport_S3B support 2022-10-20 15:41:09 +02:00
Kconfig.rcar drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.rpi_pico drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.rtt drivers: serial: rtt: Remove DT_COMPAT_<compat> defines 2022-08-31 21:57:52 +00:00
Kconfig.rv32m1_lpuart drivers: serial: rv32m1_lpuart: Remove unused Kconfig symbols 2022-07-21 16:40:28 +00:00
Kconfig.s32 arch: support nocache for Cortex-R52 2022-12-12 10:39:31 +01:00
Kconfig.sam0 drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.sifive drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.smartbond drivers: serial: Add driver for smartbond 2022-08-31 20:32:03 +02:00
Kconfig.stellaris drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.stm32 drivers: serial: Reset UART using RCC before initialization 2022-12-09 09:43:36 -08:00
Kconfig.test drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.uart_sam drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.usart_sam drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.xec drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.xen drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.xlnx drivers: serial: Update drivers to use devicetree Kconfig symbol 2022-07-21 10:29:06 +02:00
Kconfig.xmc4xxx drivers: uart_xmc4xxx: Add fifo support 2022-10-14 15:06:19 +02:00
leuart_gecko.c soc: arm: silabs: remove soc_gpio_configure wrapper 2022-12-20 22:50:19 +01:00
serial_esp32_usb.c drivers: serial: check if clock device is ready before accessing 2022-08-09 17:16:16 +02:00
serial_test.c drivers/serial: Make serial_test a proper emul 2022-09-08 15:26:41 +00:00
uart_altera_jtag.c drivers: serial: uart_altera_jtag: Fix wrong register address used 2022-06-28 07:34:29 -04:00
uart_apbuart.c include: add missing sys/time_units.h include 2022-10-11 18:05:17 +02:00
uart_b91.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
uart_cc13xx_cc26xx.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_cc32xx.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_cdns.c drivers: serial: Add Driver for CDNS UART IP6528 2022-12-12 12:19:35 -05:00
uart_cdns.h drivers: serial: Add Driver for CDNS UART IP6528 2022-12-12 12:19:35 -05:00
uart_cmsdk_apb.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_esp32.c drivers: serial: check if clock device is ready before accessing 2022-08-09 17:16:16 +02:00
uart_gecko.c dts: uart: silabs: make peripheral-id optional 2022-12-20 22:50:19 +01:00
uart_handlers.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
uart_hvc_xen.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
uart_hvc_xen_consoleio.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
uart_imx.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_ite_it8xxx2.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
uart_liteuart.c drivers: use unsigned int for irq_lock() 2022-07-14 14:37:13 -05:00
uart_lpc11u6x.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
uart_lpc11u6x.h drivers: serial: lpc11u6x: Remove DT_LABEL usage 2022-06-30 10:32:33 +02:00
uart_mchp_xec.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_mcux.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
uart_mcux_flexcomm.c drivers: uart_mcux_flexcomm: Add runtime configure 2022-12-21 09:38:33 -06:00
uart_mcux_iuart.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
uart_mcux_lpsci.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_mcux_lpuart.c drivers: mcux_lpuart: fix compile warning 2022-12-20 09:22:40 +01:00
uart_miv.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
uart_msp432p4xx.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_native_posix.c drivers: uart_native_posix: Fix reading file input 2022-10-13 16:21:08 -04:00
uart_neorv32.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_npcx.c driver: uart: npcx: add missing tx/rx interrupt enabled checks 2022-12-21 12:19:13 +01:00
uart_nrfx_uart.c drivers: serial: nrfx: ifdef optional baudrates 2022-12-28 10:38:09 +01:00
uart_nrfx_uarte.c drivers: serial: nrfx: ifdef optional baudrates 2022-12-28 10:38:09 +01:00
uart_ns16550.c drivers: uart_ns16550: Convert to use runtime PCIe BDF lookup 2022-11-16 11:18:43 +01:00
uart_ns16550.h uart: ns16550: move command macro to public header 2022-11-10 22:40:21 -05:00
uart_numicro.c drivers: serial: numicro: fix poll_in function 2022-12-08 18:46:33 +01:00
uart_pipe.c drivers: serial: pipe: init device at compile time and check if ready 2022-08-19 11:51:26 +02:00
uart_pl011.c all: Fix "#if IS_ENABLED(CONFIG_FOO)" occurrences 2022-12-21 10:09:23 +01:00
uart_psoc6.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
uart_ql_usbserialport_s3b.c drivers: serial: Add QuickLogic USBserialport_S3B support 2022-10-20 15:41:09 +02:00
uart_ql_usbserialport_s3b.h drivers: serial: Add QuickLogic USBserialport_S3B support 2022-10-20 15:41:09 +02:00
uart_rcar.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
uart_rpi_pico.c drivers: serial: convert Zephyr constants to rpi-hal constants 2022-11-19 14:18:00 +09:00
uart_rtt.c include: add missing kernel.h include 2022-10-11 18:05:17 +02:00
uart_rv32m1_lpuart.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
uart_s32_linflexd.c drivers: serial: support NXP S32 LINFlexD UART 2022-10-14 09:51:14 +02:00
uart_s32_linflexd.h drivers: serial: support NXP S32 LINFlexD UART 2022-10-14 09:51:14 +02:00
uart_sam.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
uart_sam0.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_sifive.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_smartbond.c include: add missing zephyr/kernel.h 2022-10-20 22:52:09 +09:00
uart_stellaris.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_stm32.c drivers: serial: fix STM32 async uart driver 2023-01-04 10:33:49 +01:00
uart_stm32.h drivers: serial: Reset UART using RCC before initialization 2022-12-09 09:43:36 -08:00
uart_xlnx_ps.c include: add missing zephyr/irq.h include 2022-10-17 22:57:39 +09:00
uart_xlnx_uartlite.c include: add missing kernel.h include 2022-10-11 18:05:17 +02:00
uart_xmc4xxx.c drivers: serial: uart_xmc4xxx: Fix write to fifo with more than one byte 2022-12-05 11:03:22 +01:00
usart_gd32.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00
usart_sam.c include: add missing irq.h include 2022-10-11 18:05:17 +02:00