Skip to content

Commit

Permalink
drivers: uart: atmel_sam: Added reset after error check
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
IVandeVeire committed Jun 28, 2023
1 parent bbec614 commit 93c0916
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/serial/uart_sam.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 93c0916

Please sign in to comment.