drivers: serial: uart_nrfx_uarte2: Disable RX when error is reported

According to the API specification when RX error occurs receiver
shall be disabled. Adding missing disabling to the error handler.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruściński 2024-04-22 10:45:22 +02:00 committed by Anas Nashif
commit 3b232d5e07

View file

@ -359,6 +359,9 @@ static void evt_handler(nrfx_uarte_event_t const *event, void *context)
break;
case NRFX_UARTE_EVT_ERROR:
data->async->err = event->data.error.error_mask;
if (IS_ASYNC_API(dev)) {
(void)uart_rx_disable(dev);
}
break;
case NRFX_UARTE_EVT_RX_BUF_REQUEST:
on_rx_buf_req(dev);