diff --git a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/serial_api.c b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/serial_api.c index 36c334e99b..bdfb73b2ac 100644 --- a/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/serial_api.c +++ b/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/serial_api.c @@ -140,10 +140,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint } if (serial_irq_ids[index] != 0) { - if (transmit_empty) + if (transmit_empty && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_TxDataRegEmptyInterruptEnable)) irq_handler(serial_irq_ids[index], TxIrq); - if (receive_full) + if (receive_full && (UART_GetEnabledInterrupts(uart_addrs[index]) & kUART_RxDataRegFullInterruptEnable)) irq_handler(serial_irq_ids[index], RxIrq); } }