for a special serial device (LIN) i need to generate a BREAK signal. This is, when TX is going LOW for 25ms and HIGH for 25ms bevore sending any further bytes at normal serial speed.
I managed to generate this signal by:
Hopefully, this is the way to do it? If not, please tell me!
Now, because this LIN-Device uses a single-wire serial-bus, TX and RX are coupled, so i read all i send. The BREAK signal generation therefore also produces a 0x00 byte in the RX-FIFO and most likely a frame error in the RX-UART control.
I think i should clear some errorflags and rx-fifo (flush) after the signal is send, to prevent errors in sending/receiving with normal serial comm. How to do this?