Skip to content

Commit 818d9dc

Browse files
PetervdPerk-NXPkartben
authored andcommitted
drivers: serial: uart_mcux_lpuart: RX IRQ Enable RxOverrun flag
If the RX FIFO buffer is full and there's nothing being transmitted no LPUART interrupt will fire anymore. Thus the application will not receive any bytes anymore. By enabling kLPUART_RxOverrunInterruptEnable we will receive interrupts even though RX FIFO is full so we can recover from this. Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
1 parent a4a6130 commit 818d9dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/serial/uart_mcux_lpuart.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,15 +337,15 @@ static int mcux_lpuart_irq_tx_ready(const struct device *dev)
337337
static void mcux_lpuart_irq_rx_enable(const struct device *dev)
338338
{
339339
const struct mcux_lpuart_config *config = dev->config;
340-
uint32_t mask = kLPUART_RxDataRegFullInterruptEnable;
340+
uint32_t mask = kLPUART_RxDataRegFullInterruptEnable | kLPUART_RxOverrunInterruptEnable;
341341

342342
LPUART_EnableInterrupts(config->base, mask);
343343
}
344344

345345
static void mcux_lpuart_irq_rx_disable(const struct device *dev)
346346
{
347347
const struct mcux_lpuart_config *config = dev->config;
348-
uint32_t mask = kLPUART_RxDataRegFullInterruptEnable;
348+
uint32_t mask = kLPUART_RxDataRegFullInterruptEnable | kLPUART_RxOverrunInterruptEnable;
349349

350350
LPUART_DisableInterrupts(config->base, mask);
351351
}

0 commit comments

Comments
 (0)