AnsweredAssumed Answered

Why LPUART2 IRQHandler not working?

Question asked by Rysard Suboc on May 21, 2018
Latest reply on May 22, 2018 by Robin_Shen

I am using MKL82Z MCU, and kinetis sdk 2.3 libraries.

 

I initialized LPUART2 interface:

 

CLOCK_SetLpuartClock(1);
lpuart_config_t config;
LPUART_GetDefaultConfig(&config);
config.baudRate_Bps = 115200;
config.enableTx = true;
config.enableRx = true;

LPUART_Init(LPUART2, &config, CLOCK_GetFreq(kCLOCK_PllFllSelClk));
LPUART_EnableInterrupts(LPUART2, kLPUART_RxDataRegFullInterruptEnable);
EnableIRQ(LPUART2_IRQn);

 

My lpuart2 irq handel function:

 

void LPUART2_IRQHandler(void)
{
     uint32_t Status_Flag = LPUART_GetStatusFlags(LPUART2);
     for(size_t i = 0; i < 5; i++)
     {
          ToggleLed(1);
          delayMs(30);
     }
}

 

I Never falls into the LPUART2_IRQHandler function.

why this is happening?

Outcomes