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

Reset UART FIFO for Rxbuffer

Is there an instruction or function to reset UART FIFO for Rxbuffer?

Parents
  • I assume you are using the app UART library. You can reset (flush) the UART FIFO RX buffer by calling app_uart_flush(). However, this will flush both the RX and the TX buffer. I couldn't find any functions that did this on the highest abstraction layer (app_uart.h). If you want only to clear the RX buffer you have to modify the files app_uart_fifo.c and app_uart.h (create a function that only runs app_fifo_flush(&m_rx_fifo);)

    Best regards,

    Simon

Reply
  • I assume you are using the app UART library. You can reset (flush) the UART FIFO RX buffer by calling app_uart_flush(). However, this will flush both the RX and the TX buffer. I couldn't find any functions that did this on the highest abstraction layer (app_uart.h). If you want only to clear the RX buffer you have to modify the files app_uart_fifo.c and app_uart.h (create a function that only runs app_fifo_flush(&m_rx_fifo);)

    Best regards,

    Simon

Children
No Data
Related