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

How to know the remaining room in UART fifo?

Dear Sirs,

I use the standard printf() function to communicate via UART (with retargeting).

Unfortunately could not find a way to not overwrite a buffer.

The only workaround I have found is an additional delay as below:

printf("nRF52: command received from main processor\r\n");
nrf_delay_ms(100);
printf("next sentence...\r\n");

I try to use the following fifo function, but I do not know how to get a pointer to the tx fifo buffer

    app_fifo_write(&m_tx_fifo, NULL, &data_len);

I get following error,  in despite of the library app_fifo.c added to the project....

..\..\..\main.c(1041): error:  #20: identifier "m_tx_fifo" is undefined

Unfortunately, the APP_UART_FIFO_INIT macro does not return any info about used buffer...

I use 14.2 SDK &  custom board with nrf52810.

Thank you in advance for your help

Andre

Parents Reply Children
Related