Hello,
I am really wondering about the design of the UARTE peripheral. The documentation for the nrf_drv_uart and the nrf_serial library is lacking quite a bit. Most of the documentation is the sourcecode it seems. I need to implement reliable communication between two controllers without the use of FlowControl. So the natural way is to look at EasyDMA.
Of course, the EasyDMA buffers have to be big enough so that no packets can be dropped while the SoftDevice is active. Let's say, the softdevice interrupts my application for 2ms and my UART is running at 1Mbit. That gives me around 200 bytes I could miss in that time, which means they have to be buffered using EasyDMA. So far so good.
But if I make the EasyDMA receive buffer 256 bytes big, I will not get any interrupts only, when the buffer is full. But maybe the other controller only sends 50 bytes and then has nothing to send for a few seconds? How will I receive the data? If I have to use a timeout, that would be a really crude workaround and means I will have a delay when receiving messages most of the time.
The example of the nrf_serial library example uses a dma buffer of 1 byte, like if it tries to hide something. What's the usecase of having easydma if my buffers are 1 byte big?
Also, does the nrf_serial library use double buffering? It looks like there are parts in the code where uart messages will get lost if the softdevice activates within these lines.
Thanks,
Marius