Skip to content

Commit 93af661

Browse files
committed
Properly disable LPC1549 usart interrupt
1 parent e1b89d4 commit 93af661

File tree

1 file changed

+1
-1
lines changed
  • libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX

1 file changed

+1
-1
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/serial_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable) {
251251
} else { // disable
252252
int all_disabled = 0;
253253
SerialIrq other_irq = (irq == RxIrq) ? (TxIrq) : (RxIrq);
254-
obj->uart->INTENSET &= ~(1 << ((irq == RxIrq) ? 0 : 2));
254+
obj->uart->INTENCLR |= (1 << ((irq == RxIrq) ? 0 : 2)); // disable the interrupt
255255
all_disabled = (obj->uart->INTENSET & (1 << ((other_irq == RxIrq) ? 0 : 2))) == 0;
256256
if (all_disabled)
257257
NVIC_DisableIRQ(irq_n);

0 commit comments

Comments
 (0)