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,

    I am looking for a solution that does not require changes in the app_uart library files, which is not the case in the proposals in the referenced thread.

    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.

    It is pity that such basic functionality, to check free space in the FIFO,  is not provided by the app_uart library APIs.

    KR

Children
Related