Zephyr async uart driver corrupts data on UARTE frame timeout

Related to the issue reported here:  RE: Framing Errors seen on nRF54L15 UART. Is it super sensitive to stop bit timing? 

If the UARTE FRAMETIMEOUT fires while new data is coming in then some bits of the new data is dropped, leading to corruption and potentially framing errors.

I've attached a loopback sample app that reliably reproduces this issue within seconds on the nRF54L15 DK. Simply connect a jumper wire between pins P1.11 and P1.12 then build and flash the image for the nrf54l15dk/nrf54l15/cpuapp board.

async_uart_echo.tar.gz

Parents
  • Hi,

    Thanks for the heads-up, and the way to reproduce it. 

    We're aware of the issue now and are working on it. Please talk to your RSM if you need this solved urgently and want us to prioritize this bug.

    Regards,

    Elfving

  • Hi Elfving, 

    we are having similar issue. Getting framing error and garbage character received. 

    We have two boards one with NRF52840 which we are running on NRF5 SDK16 and in the similar board (Only MCU changed, no other change on board) with NRF54L15 running on NCS v3.0.2. 

    With NRF52840 SDK16 no issue faced.

    On NRF54L15, Schematic already reviewed by Nordic. We are using UART30, P0.0 and P0.1 gpio used.

    See bellow logs for different cases. where we are getting error while communicating with cellular modem.


    Log 1:  

    00> [00:00:17.400,794] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:00:17.400,806] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:00:17.400,968] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,080] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,367] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,512] <dbg> app_uart: free_rx_buf: Freed RX buffer 2
    00> [00:00:17.401,522] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:00:17.401,533] <dbg> app_uart: app_uart_cb: RX disabled, restarting with timeout
    00> [00:00:17.401,561] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:00:17.401,642] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,726] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,935] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.402,170] <dbg> app_uart: free_rx_buf: Static rx_buf released; ignoring.
    00> [00:00:17.402,182] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:00:17.402,192] <dbg> app_uart: app_uart_cb: RX disabled, restarting with timeout
    00> [00:00:17.402,210] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:00:17.431,399] <dbg> app_uart: free_rx_buf: Static rx_buf released; ignoring.
    00> [00:00:17.431,420] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 2
    00> [00:00:17.866,819] <dbg> app_cellular: Cell_Parser: Cell App Ready
    00> [00:00:17.866,846] <inf> app_uart: app_uart_clear_rx_buf:
    00> RDY
    00>
    00> +CFUN: 1
    00>
    00> +QUSIM: 1
    00>
    00> +TJ5ʪH
    00> +CPIN: READY
    00>
    00> APP RDY


    Log 2:

    00> [00:08:13.248,710] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:08:13.248,731] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:08:13.249,054] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,140] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,226] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,313] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,400] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,598] <dbg> app_uart: free_rx_buf: Freed RX buffer 2
    00> [00:08:13.249,610] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:08:13.249,621] <dbg> app_uart: app_uart_cb: RX disabled, restarting with timeout
    00> [00:08:13.249,648] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:08:13.270,019] <dbg> app_uart: free_rx_buf: Static rx_buf released; ignoring.
    00> [00:08:13.270,042] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 2
    00> [00:08:13.289,073] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:08:13.289,084] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:08:13.298,908] <dbg> app_uart: free_rx_buf: Freed RX buffer 2
    00> [00:08:13.298,919] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 2
    00> [00:08:13.642,746] <inf> app_uart: app_uart_clear_rx_buf:
    00> RDY
    00>
    00> +U9
    00> +QUSIM: 1
    00>
    00> +QIND: SMS DONE
    00>
    00> +CPIN: READY
    00>
    00> AP RDY


     

Reply
  • Hi Elfving, 

    we are having similar issue. Getting framing error and garbage character received. 

    We have two boards one with NRF52840 which we are running on NRF5 SDK16 and in the similar board (Only MCU changed, no other change on board) with NRF54L15 running on NCS v3.0.2. 

    With NRF52840 SDK16 no issue faced.

    On NRF54L15, Schematic already reviewed by Nordic. We are using UART30, P0.0 and P0.1 gpio used.

    See bellow logs for different cases. where we are getting error while communicating with cellular modem.


    Log 1:  

    00> [00:00:17.400,794] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:00:17.400,806] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:00:17.400,968] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,080] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,367] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,512] <dbg> app_uart: free_rx_buf: Freed RX buffer 2
    00> [00:00:17.401,522] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:00:17.401,533] <dbg> app_uart: app_uart_cb: RX disabled, restarting with timeout
    00> [00:00:17.401,561] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:00:17.401,642] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,726] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.401,935] <err> app_uart: RX stopped: reason 4
    00> [00:00:17.402,170] <dbg> app_uart: free_rx_buf: Static rx_buf released; ignoring.
    00> [00:00:17.402,182] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:00:17.402,192] <dbg> app_uart: app_uart_cb: RX disabled, restarting with timeout
    00> [00:00:17.402,210] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:00:17.431,399] <dbg> app_uart: free_rx_buf: Static rx_buf released; ignoring.
    00> [00:00:17.431,420] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 2
    00> [00:00:17.866,819] <dbg> app_cellular: Cell_Parser: Cell App Ready
    00> [00:00:17.866,846] <inf> app_uart: app_uart_clear_rx_buf:
    00> RDY
    00>
    00> +CFUN: 1
    00>
    00> +QUSIM: 1
    00>
    00> +TJ5ʪH
    00> +CPIN: READY
    00>
    00> APP RDY


    Log 2:

    00> [00:08:13.248,710] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:08:13.248,731] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:08:13.249,054] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,140] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,226] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,313] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,400] <err> app_uart: RX stopped: reason 4
    00> [00:08:13.249,598] <dbg> app_uart: free_rx_buf: Freed RX buffer 2
    00> [00:08:13.249,610] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:08:13.249,621] <dbg> app_uart: app_uart_cb: RX disabled, restarting with timeout
    00> [00:08:13.249,648] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:08:13.270,019] <dbg> app_uart: free_rx_buf: Static rx_buf released; ignoring.
    00> [00:08:13.270,042] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 2
    00> [00:08:13.289,073] <dbg> app_uart: free_rx_buf: Freed RX buffer 0
    00> [00:08:13.289,084] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 0
    00> [00:08:13.298,908] <dbg> app_uart: free_rx_buf: Freed RX buffer 2
    00> [00:08:13.298,919] <dbg> app_uart: alloc_rx_buf: Allocating RX buffer 2
    00> [00:08:13.642,746] <inf> app_uart: app_uart_clear_rx_buf:
    00> RDY
    00>
    00> +U9
    00> +QUSIM: 1
    00>
    00> +QIND: SMS DONE
    00>
    00> +CPIN: READY
    00>
    00> AP RDY


     

Children
No Data
Related