Is there a guide or Application Note Document that I can use to understand the EcuM module. I am trying to understand how to use the Wakeup Sources etc. and what modules can Run when the MCU is in sleep mode, as well as the required functions to call. I couldn't find the EcuM Integration Manual or EcuM User Manual.
If there is no guide or Application Note, can you please tell me how can I set-up a Wakeup Timer and whether the communication peripherals (CAN, LIN, SPI etc.) work when MCU is in the sleep mode? It says in the CAN Integration Manual that a Self-Wakeup functionality can be used if it is available for the hardware. Is it available for S32K118, and if so how can I set it up and use?
Thanks in advance,
M. Talha Uyar
Hello Muhammet Uyar,
The EcuM in the MCAL driver just support as stub. So it will not have a guide or Application node.
If there is no guide or Application Note, can you please tell me how can I set-up a Wakeup Timer and whether the communication peripherals (CAN, LIN, SPI etc.) work when MCU is in the sleep mode?
[Hung]
Best regards,
Hung.
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.
Hello Muhammet Uyar,
In the autosar specification have pointed that the GPT notification will not use for wake up so it will not be called as wake-up notification.
The specification also mention the GptWakeupConfiguration which use for wakeup notification.
Best regards,
Hung.