Hi,
I am using S32k312 controller mini EVBKIT, for checking the functionality of MCU sleep and wakeup. I am trying to make MCU-Wake up through ADC interrupt by giving low threshold and high threshold voltage value in ADC. Do this functionality work to make MCU wakeup.
Hello @LavanyaPilli
Since ADC module is not available in Standby, you cannot use it to wakeup (unless the ADC pin is used as interrupt wakeup). However, LPCMP is available in Standby, and can be used instead:
LPCMP reads the analog input pin voltage against a programmable DAC reference and generates a wakeup once the threshold is crossed. You can refer to the following examples:
Best regards,
Julián
Hi,
Hello @LavanyaPilli,
Sure. If you are using PTA1 (ADC0_S9) as external interrupt wakeup, you can refer to the S32K312_IOMUX.xlsx file to find the assigned WKPU channel:
PTA1 is WKPU[5], however, you must also add +4 as offset because of the 4 internal wake up sources. This makes PTA1 WKPU_CH_9.
You must initialize the WKPU unit, and configure the respective channel:
/* WKPU configuration */
Wkpu_Ip_Init(WKPU_INST, &Wkpu_Ip_Config_PB);
Wkpu_Ip_EnableInterrupt(WKPU_INST, Wkpu_Ip_ChannelConfig_PB[0].hwChannel);
You can use the following low power examples as reference:
Best regards,
Julián
Hello @Julián_AragónM ,
Thank you for the reference; it is very helpful. We are currently utilizing the CAN-based wakeup configuration. We will evaluate the ADC-based wakeup setup at a later stage.