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 <ibe.vandeveire@basalte.be>
This commit is contained in:
Ibe Van de Veire 2023-06-28 14:06:32 +02:00 committed by Carles Cufí
commit 007dc6d98f

View file

@ -91,6 +91,8 @@ static int uart_sam_err_check(const struct device *dev)
errors |= UART_ERROR_FRAMING;
}
uart->UART_CR = UART_CR_RSTSTA;
return errors;
}