Hi, I'm looking for an easy way to use the UART in blocking mode (or something similiar) with a receive buffer that is filled in background:
In the past, on the nRF51, we used the app_uart library with FIFO support. Looking at the SDK11 documentation on infocenter.nordicsemi.com, I couldn't find any information about this library (although the directory is still there in the SDK11 archive). Is app_fifo still working on SDK11 on nRF52? Does it take advantage of the EasyDMA feature?
Looking at nrf_drv_uart.h, double buffering is mentioned to provide support for continuous data reception in non-bocking mode. But what does happen if the last received data byte does not fill the buffer to 100%? Will the driver wait for more bytes until the buffer is full, not giving any opportunity to receive data from the partially filled buffer? In other words, is there any possibility to receive "byte streams" of arbitrary length using UART with EasyDMA (something like app_uart with FIFO feature using EasyDMA)?
Based on my discussion with bat13 in the comments, I have been looking into the UARTE documentation in Product Specification v1.0 and came to the following conclusion:
My current assumption is that it…
This post contains some information about the UART peripheral and example with the nRF52. See the @hungbui 's answer.
In SDK11, two issues with the UART have been fixed:
I understand your concern about when the number of byte received doesn't reach the MAXCNT and we won't able to know how many byte we receive until we trigger a STOPRX task. And then if we trigger…
The documentation about the FIFO implementation is available in the "SDK common libraries" section, see this link. The FIFO API has a new function in SDK11.
Was there a resolution to this situation? I'm also trying to use EasyDMA + a timeout to do serial RX, but I run into the same problem that the UART event handler will not get called if the RX buffer hasn't been completely filled. i.e. partial fills don't eventually cause a timeout.