Commit 007dc6d9 authored by Ibe Van de Veire's avatar Ibe Van de Veire Committed by Carles Cufi
Browse files

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: default avatarIbe Van de Veire <ibe.vandeveire@basalte.be>
parent 737afd31
Loading
Loading
Loading
Loading
+2 −0
Changes for drivers/serial/uart_sam.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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;
}