Using timeout on UART receiver
Posted: Fri Oct 27, 2017 6:44 pm
Hi,
I am using the ESP32 uart for a RS485 half duplex connection. I need a way to stop waiting for data on RX.
The loop I do:
- Send a RS485 command (500 kBaud)
- Wait for data or timeout in +/-25 us
It is completly IRQ based.
One way to do this is maybe a hardware timer with a irq.
Maybe it is also possible to use the UART_RXFIFO_TOUT_INT interrupt? But this part is not well documented.
Any ideas?
Best, Erik
I am using the ESP32 uart for a RS485 half duplex connection. I need a way to stop waiting for data on RX.
The loop I do:
- Send a RS485 command (500 kBaud)
- Wait for data or timeout in +/-25 us
It is completly IRQ based.
One way to do this is maybe a hardware timer with a irq.
Maybe it is also possible to use the UART_RXFIFO_TOUT_INT interrupt? But this part is not well documented.
Any ideas?
Best, Erik