From 0b9eeb9bae96e45b2e6647a77ee5ea4fcfd17a13 Mon Sep 17 00:00:00 2001 From: asterix Date: Wed, 14 May 2008 09:46:22 +0000 Subject: [PATCH] signed-off-by: Massimiliano Cialdi approved-by: Daniele Basile Reset error flag in serial status register every time we read it. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1250 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/arm/drv/ser_at91.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bertos/cpu/arm/drv/ser_at91.c b/bertos/cpu/arm/drv/ser_at91.c index f42af89d..19f36df8 100644 --- a/bertos/cpu/arm/drv/ser_at91.c +++ b/bertos/cpu/arm/drv/ser_at91.c @@ -792,6 +792,7 @@ static void uart0_irq_rx(void) /* Should be read before US_CRS */ ser_uart0->status |= US0_CSR & (SERRF_RXSROVERRUN | SERRF_FRAMEERROR); + US0_CR = BV(US_RSTSTA); char c = US0_RHR; struct FIFOBuffer * const rxfifo = &ser_uart0->rxfifo; @@ -856,6 +857,7 @@ static void uart1_irq_rx(void) /* Should be read before US_CRS */ ser_uart1->status |= US1_CSR & (SERRF_RXSROVERRUN | SERRF_FRAMEERROR); + US1_CR = BV(US_RSTSTA); char c = US1_RHR; struct FIFOBuffer * const rxfifo = &ser_uart1->rxfifo; -- 2.25.1