My application is using the FIFO UART module to communicate with another MCU. It is also running softdevice S132 v2.0.0.
While most of the time everything runs smoothly, I will occasionally receive a APP_UART_COMMUNICATION_ERROR with reason of overrun. Presumably, this is because the softdevce is jumping in at the same time as a data transfer is taking place.
Unfortunately, the MCU I am communicating with does not have a driver for flow control and I likely don't have time to write one either.
My question is: if I switch over to using the UARTE with EasyDMA, will this solve my problem or is flow control the only solution?
After reading the PS on the UARTE it is clear there is no guarantee that characters won't be dropped if flow control is not used. Practically speaking I would imagine if you set your buffer sizes sufficiently large you would probably be OK.
My understanding of the FIFO UART module is that in an overrun situation, it isn't the software defined buffer size that is the problem, it is the hardware buffer for the UART. Since softdevice is higher priority, it can hog up the CPU enough that those buffers fill before they can be moved to memory.
Well, I could be wrong but I thought the point of the EasyDMA was to allow the peripheral to transfer data to and from RAM without having to execute code. So it can be transferring data while the stack has control of the CPU.
The FIFO used in app_uart_fifo is a software defined fifo (buffer) and will not save you from SoftDevice interrupts. UARTE use DMA to transfer the data to RAM and lets the application know when the buffer is full.
The current uart SDK driver does not utilize this yet. It only uses a buffer of 1 byte, which will give you the same problems.
Ole, so just to clarify, if I do switch to UARTE with EasyDMA driver, and away from the FIFO driver, then I likely won't need to worry about not having flow control?
Your answer sort of reads that the UARTE drivers don't have EasyDMA support, but I don't think that is what you actually meant.