Hello NXP Support,
We are using the S32K312 MCU and have configured a WKPU (Wake-Up Unit) channel with an interrupt callback.
Note: Add +4 offset to Wkpu[n] -> n+4
We would like to clarify the behaviour of the WKPU when the ECU enters a low-power mode.
Our questions are:
If the MCU is in Sleep/Standby mode, does the WKPU continue monitoring the configured external wake-up pin?
When the configured external edge is detected during Sleep/Standby mode, will the WKPU wake the MCU?
After the MCU wakes up, will the configured WKPU interrupt callback be executed automatically, or is additional software handling required?
Are there any specific WKPU, NVIC, or Power Management configurations required to ensure wake-up from Sleep/Standby mode?
Are there any differences in WKPU wake-up behaviour between the supported low-power modes (Sleep, STOP, STANDBY, etc.) on the S32K312?
We are using the NXP RTD drivers for the S32K312.
Thank you for your support.
Hi NXP Team,
Thanks for your quick response.
I am using the NXP S32K312 MCU. I have configured an external interrupt source (WKPU) on PTB2 (WKPU Channel 8). The interrupt is intended to wake the MCU from Sleep/Standby mode when the Sensor INT2 pin asserts.
My question is:
When an external WKPU interrupt is received, should the configured callback function be invoked automatically after wake-up?
Or does the WKPU only generate a wake-up event when the external source is configured as an input on the WKPU pin, and do I need to configure PTB2 as an EIRQ pin and use the WKPU driver as the peripheral?
If a callback is expected, are there any additional configurations required (e.g., NVIC, interrupt routing, WKPU settings, or mode-dependent limitations)?
In my current implementation, the external interrupt successfully wakes the MCU when configured as EIRQ/ECU in Run mode, but it does not work in Standby mode(Wkpu configured in both pin and peripherals), and the configured callback is not executed.
Could you please clarify the expected WKPU behavior and the required configuration for callback execution?
Thank you.
Hi @Dia,
I suggest looking into the low power management documentation from S32K3 Low Power Management AN and demos.
You can also refer to the latest examples: [RTD600 MCAL & IP] S32K3 Low Power Management AN and demos.
Best regards,
Julián
Hi @Dia,
When an external WKPU interrupt is received, should the configured callback function be invoked automatically after wake-up?
After calling interrupt initialization, WKPU_EXT_IRQ_SINGLE_ISR() will be entered. If you need to use callback, you can add the following lines before calling interrupt initialization:
Wkpu_Ip_u32ChState[0].chInit = TRUE;
Wkpu_Ip_u32ChState[0].notificationEnable = TRUE;
Wkpu_Ip_u32ChState[0].WkpuChannelNotification = Wkpu_Callback;
IntCtrl_Ip_Init(&IntCtrlConfig_0);
After ISR is serviced, WKPU callback will be entered.
Or does the WKPU only generate a wake-up event when the external source is configured as an input on the WKPU pin, and do I need to configure PTB2 as an EIRQ pin and use the WKPU driver as the peripheral?
This is valid as well. You can use callback configuration to know if a WKPU request was called before Standby.
If a callback is expected, are there any additional configurations required (e.g., NVIC, interrupt routing, WKPU settings, or mode-dependent limitations)?
See first response.
Can you stop MCU right after Standby exit (wake-up), and place a breakpoint inside WKPU_EXT_IRQ_SINGLE_ISR to see if MCU is jumping to it?
Best regards,
Julián