Skip to content

Commit

Permalink
Fix receive interrupt bug in Esp32 uart driver (#2446)
Browse files Browse the repository at this point in the history
FIFO receive event should disable interrupt, not enable it.
This could cause recursive interrupt entry and watchdog timeout.
  • Loading branch information
mikee47 authored Dec 11, 2021
1 parent 9c6722a commit 6601f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sming/Arch/Esp32/Components/driver/uart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ void IRAM_ATTR uart_isr(smg_uart_instance_t* inst)
if(usis.rxfifo_ovf) {
uart_ll_disable_intr_mask(dev, UART_INTR_RXFIFO_OVF);
} else if(read == 0) {
uart_ll_ena_intr_mask(dev, UART_INTR_RXFIFO_FULL | UART_INTR_RXFIFO_TOUT);
uart_ll_disable_intr_mask(dev, UART_INTR_RXFIFO_FULL | UART_INTR_RXFIFO_TOUT);
}
}

Expand Down

0 comments on commit 6601f4e

Please sign in to comment.