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

app_uart fifo buffer: is it possible to see how much space empty in tx buffer and filled in rx buffer

Hi,

I am using app_uart library with Tx and Rx FiFo. I want to check how much space is available in the Tx FiFo at any time, and similarly how much space is filled in the Rx FiFo. Does anyone know if that is possible and how.  Apparently the app_uart library does not provide any API for this purpose.

Thanks

Parents Reply
  • Hi Jatala,

    In my application I need to send fixed length packets. I think it would better to write the complete packet when there is sufficient free space in the UART FIFO, instead of first copying the packet to a local buffer, and then writing to the FIFO byte-by-byte, and each time checking whether the writing was successful. In the latter case, overhead would be much higher.

    If you are looking for something more sophisticated than the app_uart library, and don't want to modify the app_uart library, then I would recommend taking look at the serial example and the experimental_libuarte example in SDK 15.3

Children
No Data
Related