We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e97a9fa commit c527a76Copy full SHA for c527a76
cores/esp8266/uart.c
@@ -172,7 +172,11 @@ void uart_start_isr(uart_t* uart)
172
if(uart == NULL || !uart->rx_enabled) {
173
return;
174
}
175
- USC1(uart->uart_nr) = (127 << UCFFT) | (0x02 << UCTOT) | (1 <<UCTOE );
+ // UCFFT value is when the RX fifo full interrupt triggers. A value of 1
176
+ // triggers the IRS very often. A value of 127 would not leave much time
177
+ // for ISR to clear fifo before the next byte is dropped. So pick a value
178
+ // in the middle.
179
+ USC1(uart->uart_nr) = (100 << UCFFT) | (0x02 << UCTOT) | (1 <<UCTOE );
180
USIC(uart->uart_nr) = 0xffff;
181
USIE(uart->uart_nr) = (1 << UIFF) | (1 << UIFR) | (1 << UITO);
182
ETS_UART_INTR_ATTACH(uart_isr, (void *)uart);
0 commit comments