
Watchdog resets were experienced during autoboot delay. Petting the watchdog during putc() and tstc() functions solve the issue.
Signed-off-by: Nicolas Ferre nicolas.ferre@atmel.com --- drivers/serial/atmel_usart.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index cad3412..fcaee5d 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -80,7 +80,8 @@ void serial_putc(char c) if (c == '\n') serial_putc('\r');
- while (!(usart3_readl(CSR) & USART3_BIT(TXRDY))) ; + while (!(usart3_readl(CSR) & USART3_BIT(TXRDY))) + WATCHDOG_RESET(); usart3_writel(THR, c); }
@@ -99,5 +100,6 @@ int serial_getc(void)
int serial_tstc(void) { + WATCHDOG_RESET(); return (usart3_readl(CSR) & USART3_BIT(RXRDY)) != 0; }