On the K32L2 micro -
I can enable the LPUART interrupt but I cannot disable it. If I execute this code the firmware will go into the UART handler no matter if I disable the second half of the code or not.
I am not sure what the reason is.
//This piece of code successfully enable LPUART interrupt upon data receival
LPUART_EnableInterrupts(LPUART0, kLPUART_RxDataRegFullInterruptEnable);
LPUART_EnableInterrupts(LPUART1, kLPUART_RxDataRegFullInterruptEnable);
EnableIRQ(LPUART0_IRQn);
EnableIRQ(LPUART1_IRQn);
//This piece of code UNsuccessfully DISable LPUART interrupt upon data receival
LPUART_DisableInterrupts(LPUART0, kLPUART_RxDataRegFullInterruptEnable);
LPUART_DisableInterrupts(LPUART1, kLPUART_RxDataRegFullInterruptEnable);
DisableIRQ(LPUART0_IRQn);
DisableIRQ(LPUART1_IRQn);