Hi,
I have the following setting. I have a dongle with with a nrf52 which sensd all data received from the NUS service to the host via a uart and a FTDI. The FTDI is capable of running up to 3 MBaud. When I use a low Baudrate like 230400 and send not less data all is running fine. When the data rate increases the uart crashes because the data received by the nus is higher than the baudrate via uart. Now I increased the Baudrate and enabled Flow control as suggested by the manual.
app_uart_comm_params_t const comm_params =
{
.rx_pin_no = RX_PIN_NUMBER,
.tx_pin_no = TX_PIN_NUMBER,
.rts_pin_no = RTS_PIN_NUMBER,
.cts_pin_no = CTS_PIN_NUMBER,
.flow_control = APP_UART_FLOW_CONTROL_ENABLED,
//.flow_control = APP_UART_FLOW_CONTROL_DISABLED,
.use_parity = false,
.baud_rate = UART_BAUDRATE_BAUDRATE_Baud921600 //UART_BAUDRATE_BAUDRATE_Baud1M
//.baud_rate = UART_BAUDRATE_BAUDRATE_Baud230400
};
APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_evt_handler,
APP_IRQ_PRIORITY_HIGH,
err_code);
APP_ERROR_CHECK(err_code);
When the application starts I receive some printf but when the real transmission is initialized the dongle freezes and the sensor disconnects and restarts advertising which indicates that the dongle somehow crashed. But there is no error message logged via RTTClient. When I set the priority to APP_IRQ_PRIORITY_LOW the program is running at least for 10 messages and then crashes with uart communication error 1.
I believe the communication error appears because the uart handler is not able to guarantee the transmission of alle data and gets a overrun. From my opinion this should be solved if the priority is increase.