I'm trying to get LPUART to work while CPU is in VLPS mode. I'm using the following code
CLOCK_EnableClock(kCLOCK_PortD);
PORT_SetPinMux(PORTD, 2U, kPORT_MuxAlt6);
PORT_SetPinMux(PORTD, 3U, kPORT_MuxAlt6);
CLOCK_SetLpuartClock(2U);
oscer_config_t oscerConfig;
oscerConfig.enableMode = kOSC_ErClkEnable | kOSC_ErClkEnableInStop;
oscerConfig.erclkDiv = 0;
OSC_SetExtRefClkConfig(OSC0, &oscerConfig);
lpuart_config_t config;
LPUART_GetDefaultConfig(&config);
config.baudRate_Bps = 115200;
config.enableTx = true;
config.enableRx = true;
LPUART_Init(LPUART0, &config, CLOCK_GetFreq(kCLOCK_Osc0ErClk));
LPUART_EnableInterrupts(LPUART0, kLPUART_RxDataRegFullInterruptEnable);
EnableIRQ(LPUART0_IRQn);
This only works while by debugger is connected and CPU is prevented from going to stop mode. If i enter stop mode, its not getting interrupts anymore. Are there any code examples that i can refer to?