Hi,
Also for the next question is I sometimes will receive this "NRF_LIBUARTE_DRV_EVT_OVERRUN_ERROR ", when I try to connect to the device, which it sends couple of bytes into the transmitting UART from phone.
I want to be able to write/send command to TX UART and read it even when RX UART is busy sending data in regular interval, How should I handle this?
It's a good idea to not make the timeout_us too small, since this will prevent the buffer to be used effectively. Making it too large may not be ideal either, since that may cause delays, so the best suggestion would be to take a look at the serial transfer on a logic analyzer and measure the timing there, and do a reasonable tradeoff between how often you want data to be notified to the application. Typically there should be some delays between uart transfers that can give a good indication of timeout_us is.
Kenneth