Recovering from UART error | Cypress Semiconductor
Recovering from UART error
I have an application that is polling a remote device for data. The polling device needs to be able to determine when the remote unit is responding or not.
At the moment I have an error count that increments each time the poll is not responded to and when count is exceeded the operator gets a warning. If the remote unit starts to respond again then operator gets indication that remote unit is ok.
During testing, I remove the cable to remote unit and get the warning. However, when reconnecting Somethings the system detects the device available and gives notice but often it does not and the code appears to stop responding. As the "Pause" function does not work when this happens, I cannot look at the call stack to see where it s.
What I am doing after loss of remote reposnse is to stop and restart the UART component. I don't think this is the best approach and cannot find a clear tutorial regarding recovering from UART errors.
Is there a status I can read and reset the flags after error detected so the UART can recover after hardware fault (serial lines being disconnected and reconnected)