I wrote application for Q2687 which listens for data on UART. Sometimes I need to flush UART receiving FIFO but function io_control() with IOC_UART_FL doesn’t work. Here is code I use:
eUartFl_t flush=UART_FLUSH_ALL; eChStatus_t status; status=uart1_itf.io_control(Uart1Handle, IOC_UART_FL, (void*)&flush); TRACE((1, "FL %d", status));
Returned status is CH_STATUS_NORMAL, but FIFO remains untouched, calling this:
while(uart1_itf.read(Uart1Handle, &receivedCharacter, 1)) TRACE((1, "%c", receivedCharacter));
after flushing FIFO proves that it still contains recived data. Have you had similar problem?