sdk17.0.2
so i am trying to flush rx/tx while the command execute
cannot find
app_fifo_flush()
or
app_uart_flush()
anyone know how to do it?
Hi
Are you using one of the standard SDK examples?
There is an app_uart_flush() function for flushing the buffers when using the app_uart driver, but it will not do anything unless you make sure to use the app_uart_fifo.c implementation.
When you say you cannot find this function, do you mean that the build fails if you try to call it?
The function is declared on line 244 of app_uart.h, and implemented on line 186 of app_uart_fifo.c
Best regards
Torbjørn
Hi
I will discuss the case with the CLI developer when he is back next week, and ask for some advice on how to proceed with this case.
You should mention this issue to your local Nordic sales representative also, and he can help give this case priority.
Best regards
Torbjørn
The reason for artifacts in the UART CLI is that it doesn't use flow control so if you paste multple bytes some will get lost as receiver is being stopped and restarted after each byte. There are 2 options:
- enable flow control
- use different transport, namely UART which is using libuarte driver. Libuarte is a driver which allows continues reception on UART, receiver is never stopped and DMA buffers are seamlessly changed. For setting up libuarte transport see this example https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/cli_libuarte_example.html?cp=8_1_4_6_8.