I have some question about UART configuration of my ESP8266.
I changed rx_tout_thrhd value from 0x02 by default to 0x10, to prevent false interrupt event of UART receiver. Now my code works just fine. But i dont know which units is used for rx_tout_thrhd value. Is it microseconds, miliseconds, parts of byte reciving time, or anything else?
My code:
Code: Select all
WRITE_PERI_REG(UART_CONF1(uart_no),
((100 & UART_RXFIFO_FULL_THRHD) << UART_RXFIFO_FULL_THRHD_S) |
((110 & UART_RX_FLOW_THRHD) << UART_RX_FLOW_THRHD_S) |
UART_RX_FLOW_EN |
(/*0x02*/0x10 & UART_RX_TOUT_THRHD) << UART_RX_TOUT_THRHD_S |
UART_RX_TOUT_EN |
((0x10 & UART_TXFIFO_EMPTY_THRHD) << UART_TXFIFO_EMPTY_THRHD_S));