Hello,
I am trying to test hardware flow control with UARTE1, with 115200 bps TX/RX is working fine with RTS/CTS always stay low(active). To prove flow control is working(that RTS can be used to stop other side sending) I tried to add delay in the UART ISR event handler to slow down the receiving, what I see now is that RTS stuck in high, from device log I see in SW we only received 2bytes, from logic analyzer I see there were 5 bytes transferred before RTS goes high. RTS never goes back low after this so RX is broken, any idea why this is happening? I also tried increased the baud rate to 460800 and saw a similar behavior.
My code is similar to this with double buffer for RX, and I didn't see any ERROR event triggered. case NRF_DRV_UART_EVT_ERROR:
app_uart_event.evt_type = APP_UART_COMMUNICATION_ERROR;
app_uart_event.data.error_communication = p_event->data.error.error_mask;
(void)nrf_drv_uart_rx(&app_uart_inst, rx_buffer, 1);
m_event_handler(&app_uart_event);
break;
case NRF_DRV_UART_EVT_TX_DONE:
// Get next byte from FIFO.
if (app_fifo_get(&m_tx_fifo, tx_buffer) == NRF_SUCCESS)
{
(void)nrf_drv_uart_tx(&app_uart_inst, tx_buffer, 1);
}
else
{
// Last byte from FIFO transmitted, notify the application.
app_uart_event.evt_type = APP_UART_TX_EMPTY;
m_event_handler(&app_uart_event);
}
break;
Thanks,
-Rui