Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

APP_UART_COMMUNICATION_ERROR in nRF52

Hi,

I have my application working on NRF SDK11 on NRF52832 with softdevice 2.0. I am porting the application to SDK 14 and SD 5.0. I am facing APP_UART_COMMUNICATION_ERROR error.

UART works fine for few packets but when I transfer very large file in small chunks continuously over UART, after few packets, I get APP_UART_COMMUNICATION_ERROR error with reason: OVERRUN. I have set TX_BUF_SIZE to 256 and RX_BUF_SIZE to 8 in application and I also played with the sizes but no success.  I am using FIFO with UART and have compiled app_uart_fifo.c in my application. I am not using flow control in my application ( as we are not using RTS, CTS pins. )  Baudrate is 115200 and I tried lower rates till 2400 too but no success. I was not facing this issue with older SDK ( v11 ). 

Any help on this issue?

Parents Reply
  • Hi 

    Have you tried to benchmark the occurrence of interrupts in your application?

    How large did you try to make the RX_BUF_SIZE?

    Do you know the size of the "chunks", and how often they are sent?

    A potential problem is that the driver won't give you an interrupt until the buffer is full, and then you have very little time to prepare a new buffer if you are in the middle of a UART transaction. 

    Ideally you want to update the buffers in between the chunks, so that you are less pressed on time. 

    Best regards
    Torbjørn

Children
Related