This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BUG: Lost/bad data between app_uart_close and app_uart_init

I have a setup where I will be switching the nRF51822 UART between two different peripherals (one being a connection to another nRF51822), so I need to be able to safely close, switch, and reopen without losing data.

app_uart_close triggers the STOPTX and STOPRX tasks as it should, but it doesn't wait for the receive timeout (RXTO) event before immediately disabling the UART. In my test (full duplex transfer of a stream continuously incremented bytes with periodic close/reopen from one side), this results in a lost byte on the chip closing/reopening and garbled data (e.g., an unexpected 0xfe byte) on the other side. Both chips are using APP_UART_FLOW_CONTROL_ENABLED and have RTS/CTS set up correctly.

Related