Ok, so in the case of GPT using LPIT it can generate interrupt in the STOP1 mode. Here is the main function I wrote:
int main(void)
{
Mcu_Init(&McuModuleConfiguration);
Mcu_InitClock(McuClockSettingConfig_0);
Mcu_SetMode((Mcu_ModeType)MCU_RUN_MODE);
Gpt_Init(&GptChannelConfigSet);
Gpt_EnableNotification(Sample_Timer);
Gpt_EnableWakeup(Sample_Timer);
sys_enableIsrSource(LPIT0_Ch0_IRQn, 0x40);
Gpt_StartTimer(Sample_Timer, 4000000);
Gpt_SetMode(GPT_MODE_SLEEP);
Mcu_SetMode((Mcu_ModeType)MCU_STOP1_MODE);
while(1)
{
}
return 0;
}
But it fails to call Gpt_Timeout_Notification when I run the code. I understand that in the GPT User Manual it is stated the GptNotification is for non-Wakeup notification only. So how can I set up a wakeup notification function for GPT?
Edit: I tried the same thing for Mcu_SetMode((Mcu_ModeType)MCU_STOP2_MODE); and the it also does not call the Gpt_Timeout_Notification.