From f7569538199ccef5afa671cfd0db7c24515a14d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Duda?= Date: Mon, 25 Nov 2019 19:44:22 +0100 Subject: [PATCH] [nrf528xx] handle overrun error on high baudrates correctly (#4350) --- examples/platforms/nrf528xx/nrf52833/platform-config.h | 2 +- examples/platforms/nrf528xx/nrf52840/platform-config.h | 2 +- examples/platforms/nrf528xx/src/uart.c | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/platforms/nrf528xx/nrf52833/platform-config.h b/examples/platforms/nrf528xx/nrf52833/platform-config.h index 182c8cc29..8dd54f44f 100644 --- a/examples/platforms/nrf528xx/nrf52833/platform-config.h +++ b/examples/platforms/nrf528xx/nrf52833/platform-config.h @@ -137,7 +137,7 @@ * */ #ifndef UART_RX_BUFFER_SIZE -#define UART_RX_BUFFER_SIZE 256 +#define UART_RX_BUFFER_SIZE 512 #endif /** diff --git a/examples/platforms/nrf528xx/nrf52840/platform-config.h b/examples/platforms/nrf528xx/nrf52840/platform-config.h index 2c03707b1..5eb8a4706 100644 --- a/examples/platforms/nrf528xx/nrf52840/platform-config.h +++ b/examples/platforms/nrf528xx/nrf52840/platform-config.h @@ -137,7 +137,7 @@ * */ #ifndef UART_RX_BUFFER_SIZE -#define UART_RX_BUFFER_SIZE 256 +#define UART_RX_BUFFER_SIZE 512 #endif /** diff --git a/examples/platforms/nrf528xx/src/uart.c b/examples/platforms/nrf528xx/src/uart.c index c9b1ff59a..e4c3131e5 100644 --- a/examples/platforms/nrf528xx/src/uart.c +++ b/examples/platforms/nrf528xx/src/uart.c @@ -284,9 +284,7 @@ void UARTE0_UART0_IRQHandler(void) // Check if any error has been detected. if (nrf_uart_event_check(UART_INSTANCE, NRF_UART_EVENT_ERROR)) { - // Clear error event and ignore erronous byte in RXD register. nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_ERROR); - nrf_uart_event_clear(UART_INSTANCE, NRF_UART_EVENT_RXDRDY); } else if (nrf_uart_event_check(UART_INSTANCE, NRF_UART_EVENT_RXDRDY)) {