Hi everybody,
Here are some related questions based on the same bug :
I build a test application which prints on a UART console the content of a file send by a PC (master) to an NRF51 dev. kit, using a serial link (921'600 bauds with Hardware Flow Control, 128 byte FIFO).
Some bytes are systematically lost, even with HFC. This bug is not due to the "high" baud-rate. The bug comes from the UART0_IRQHandler
function of the app_uart_fifo.c
file. This bug appears in the last file version included in the SDK 9 and older versions.
In the UART0_IRQHandler
, the RDX register of the UART hardware controller must not be read if the RX FIFO is full, or data will be lost !
If HFC is used, the serial transmission will be automatically stopped using the CTS line if the internal RXD buffer is not read. I use the last chip revision with the six-byte hardware buffer.
A corrected version of the file is available Github. Please look at my pull request here: github.com/.../1
Comments are welcomed.
Regards, Christopher