I have spent considerable time looking through the posts for a Kinetis FreeRTOS UART driver that works in an embedded system without failing in the simplest edge conditions. By that I mean, all the drivers I have tried in the examples must have the exact number of char's asked must be read by the driver or the driver fails to return. So a loss of char's on the Rx will cause to the driver to hang. I have read that a single char read is the way around this, but I find that to be a poor solution at best. There is no timeout mechanism on the driver.
Can anyone offer a solution please to a driver that does not hang and will timeout when all the char's are not received in a required timeout period? Under MQX this was possible by detecting the first char and checking the system time for the duration. This can be done if we rewrite the entire driver or try to patch the existing driver. The problem being that patching a distributed code section means understanding the nuances of the design which has not been explained then adding the relevant code additions. Again this leads to time and problems and then it may be best to start from zero and redo it all when the debugging and oversights are counted in.
Any direction would be appreciated.