Hello.
I notice a problem with app_uart_flush function, which is calling app_fifo_flush function and in this we have a:
uint32_t app_fifo_flush(app_fifo_t * p_fifo)
{
p_fifo->read_pos = p_fifo->write_pos;
return NRF_SUCCESS;
}
With that when I check m_tx_fifo and m_rx_fifo in app_uart_fifo.c file after some time before block I got a next values:
How it's possible when in app_fifo_put function we have a macro to check fifo length ?
uint32_t app_fifo_put(app_fifo_t * p_fifo, uint8_t byte)
{
if (FIFO_LENGTH() <= p_fifo->buf_size_mask)
{
fifo_put(p_fifo, byte);
return NRF_SUCCESS;
}
return NRF_ERROR_NO_MEM;
}
After some changes in app_fifo_flush:
uint32_t app_fifo_flush(app_fifo_t * p_fifo)
{
p_fifo->read_pos = 0;
p_fifo->write_pos = 0;
return NRF_SUCCESS;
}
UART seem work properly.
It's correct solution, or I should do this on another way ?
BR, Kamil