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

UART overrun issues and corruption

Hi,

Recently i have moved to a much newer version of the SDK and have replaced my uart driver with the new ones, from SDK 12.7. The uart is between two nRF51422s one with a softdevice running(s130), one without.

I am having a lot of trouble sending long packets, a couple of bytes is ok, but over that and the module will sometimes throw overrun errors, not always and even though there are overrun errors, the first byte before and the first byte after the error appear to be correct, so i am not seeing dataloss until a couple of bytes afterwards.it is guaranteed that RX will stop, i can never seem to receive more than ten bytes on one go. the closer it gets to the end of the packet, the more likely it is that it will miss a byte or a few.

I am using retarget and app_uart_fifo, at 1Mbaud. bytes are handled very quickly on the receiving side, and even with a 1mS delay between bytes stuff goes wrong. It seems i have to send something before RX starts again or wait a very long time.

Would also like to add the issues still occur with BLE advertising off and no connection in progress, so the softdevice should not be causing any interrupts.

Both nRFs are transmitting fine as i have verified the output with a usb to uart converter. also lowering the baud rate makes it pick up a few more bytes, but RX always ends up failing.

I would also like to add that i am not using flow control, not ideal but nothing i can do about that. The nRF with the softdevice is almost always inactive and never receives any long packets, and the other mostly sits idle with slow advertisement. There are times where the CPU will be completely blocked for long periods, but i can handle that kind of loss in another manner. So i doubt overrun should be an issue here, especially at more conservative baud rates. even then, with a delay between the bytes of 1mS should completely stop overrun as the CPU wont get blocked for periods longer than that while its just adverting only. So the only issue i really need to get resolved is why RX just stops with no error sent to the event handler.

Thanks in advance for any help, Bill.

Related