Skip to content

Commit 2615ec8

Browse files
ChiHuaLkartben
authored andcommitted
driver: serial/uart: npcx: disable rx interrupt at init
In the application, after the sysjump, the RX interrupt might remain enabled. During initialization, once the IRQ is enabled, the RX interrupt could be triggered if there is any traffic on the RX line, potentially causing an interrupt storm. This change disables the UART RX interrupt at the driver initialization to prevent this issue from occurring. Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
1 parent b52f5cb commit 2615ec8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/serial/uart_npcx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,9 @@ static int uart_npcx_init(const struct device *dev)
10661066
/* Disable all UART tx FIFO interrupts */
10671067
uart_npcx_dis_all_tx_interrupts(dev);
10681068

1069+
/* Disable rx FIFO not empty interrupt */
1070+
uart_npcx_irq_rx_disable(dev);
1071+
10691072
/* Clear UART rx FIFO */
10701073
uart_npcx_clear_rx_fifo(dev);
10711074

0 commit comments

Comments
 (0)