This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF52 clear UART FIFO

Hi,

I am using nrf52-DK (First Version in the moment) and need to test UART interface. I use the example from the blue-nus example from the SDK which is working fine. I have only some problems by correct usage of FIFO buffer which is overflowing all the time (if I am calling app_uart_put (...) more the 256 times). How can i clear this buffer?

Thank you and best regards, Nils

Parents
  • The FIFO implementation documentation is available in the "SDK common libraries" section, see this link.

    You can use the app_fifo_flush function to equals the FIFO read and write pointers and "invalidate" the data stored in the FIFO.

    To avoid FIFO overflow and to not lost bytes sent over UART, you could use Hardware Flow Control to stop the UART stream until you have processed the data available in the FIFO.

Reply
  • The FIFO implementation documentation is available in the "SDK common libraries" section, see this link.

    You can use the app_fifo_flush function to equals the FIFO read and write pointers and "invalidate" the data stored in the FIFO.

    To avoid FIFO overflow and to not lost bytes sent over UART, you could use Hardware Flow Control to stop the UART stream until you have processed the data available in the FIFO.

Children
No Data
Related