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:
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U,FUNC_GPIO1);
GPIO_OUTPUT_SET(1, 0);
usleep(25000);
GPIO_OUTPUT_SET(1, 1);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, FUNC_U0TXD);
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?