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?