Skip to content

Commit 007dc6d

Browse files
IVandeVeirecarlescufi
authored andcommitted
drivers: uart: atmel_sam: Added reset after error check
Following the sam4s datasheet, the OVRE, PARE and FRAME flags should be cleared after a uart error occured. This is done writing a 1 to the RSTSTA bit in the UART_CR. Signed-off-by: Ibe Van de Veire <[email protected]>
1 parent 737afd3 commit 007dc6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/serial/uart_sam.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ static int uart_sam_err_check(const struct device *dev)
9191
errors |= UART_ERROR_FRAMING;
9292
}
9393

94+
uart->UART_CR = UART_CR_RSTSTA;
95+
9496
return errors;
9597
}
9698

0 commit comments

Comments
 (0)