Intermittent Uart Frame Errors

Hello,

I'm running an nrf52832 (fanstel module) communicating over UART with another MCU at 460800 baud. The Uarts both have matching configurations. The baud rates are both set to 460800 using the internal clocks. The UART implementation is similar to the implementation here: https://github.com/nrfconnect/sdk-nrf/blob/main/samples/bluetooth/central_uart/src/main.c however it incorporates a ring buffer.

The UART is receiving a fairly constant stream of data and regularly gets two UART_RX_STOPPED interrupts in a row with reason framing error and then a UART_RX_DISABLED. I've attempted running at lower baud rates of 115200 and 230400 as well with no improvement.

I've analyzed the data sent with a logic analyzer and found that the LA had no errors reading the same uart frames that caused a frame error.

Parents
  • The most important factor that might effect your communications here is if you are using HWFC (hardware flowcontrol) or not. It might seem that both the UARTs on either side are working with similar configuration but there will still exist some differences in timings (rising and falling edge characteristics of the signals) that might resonate over time and can cause framing errors if you send data continuously. HWFC many times reduces this resonating effect by pausing the communications based on buffer availability. Even though this pause technically should not have any impact, we have seen that it have an impact of reducing framing errors. If you have not tried already, please enable HWFC and do this testing again. That said, UART on nRF52 products are very mature peripherals, so it is a bit unlikely to find hardware issues on it. Atleast from the support side, we will not suspect hardware issues. If you still see framing errors, then I will seek some help from you to reproduce the issue on a latest sdk version (not on main version, like the link you showed) 

Reply
  • The most important factor that might effect your communications here is if you are using HWFC (hardware flowcontrol) or not. It might seem that both the UARTs on either side are working with similar configuration but there will still exist some differences in timings (rising and falling edge characteristics of the signals) that might resonate over time and can cause framing errors if you send data continuously. HWFC many times reduces this resonating effect by pausing the communications based on buffer availability. Even though this pause technically should not have any impact, we have seen that it have an impact of reducing framing errors. If you have not tried already, please enable HWFC and do this testing again. That said, UART on nRF52 products are very mature peripherals, so it is a bit unlikely to find hardware issues on it. Atleast from the support side, we will not suspect hardware issues. If you still see framing errors, then I will seek some help from you to reproduce the issue on a latest sdk version (not on main version, like the link you showed) 

Children
No Data
Related