Hello,
MCU - MKM34/35Z - SDK Based application
SDK: SDK_2.x_TWR_KM35Z75M ver. 25.06.00
IDE: MCUXpresso IDE v25.6
Application: MCU is always in VLLS2 sleep mode, and one GPIO pin (PTG6_LLWU0) along with the Tamper0 pin (IRTC Tamper) are configured as wake-up sources. An interrupt on either pin should wake the system.
The GPIO pin behaves as expected and successfully wakes the system from VLLS2. However, the Tamper pin does not wake the system, even though it is configured exactly according to the reference application.
I am sharing the relevant code snippets for reference and would appreciate help in identifying the issue.
void RTC_TamperInit(void)
{
CLOCK_EnableClock(kCLOCK_Rtcreg);
CLOCK_EnableClock(kCLOCK_Rtc0);
IRTC_GetDefaultConfig(&irtcConfig);
irtcConfig.timerStdMask = true;
irtcConfig.wakeupSelect = true;
if (IRTC_Init(RTC, &irtcConfig) == kStatus_Fail)
{
return;
}
IRTC_SetOscCapLoad(RTC, kIRTC_Capacitor2p|kIRTC_Capacitor4p|kIRTC_Capacitor16p);
tamper0Config.filterClk = kIRTC_4;
tamper0Config.filterDuration = 2;
tamper0Config.pinPolarity = true;/*true is Active*/
IRTC_SetTamperParams(RTC, kIRTC_Tamper_0, &tamper0Config);
/* Lock tamper configuration */
IRTC_SetTamperConfigurationOver(RTC);
/* Enable RTC as LLWU wake source */
LLWU_EnableInternalModuleInterruptWakup(LLWU, LLWU_IRTC_IDX, true);
/* Clear stale flags */
IRTC_ClearStatusFlags(RTC, 0xFFFFFFFF);
IRTC_ClearTamperStatusFlag(RTC);
}
void LLWU_Init(void)
{
//GPIO PTG6
LLWU_SetExternalWakeupPinMode(LLWU, LLWU_WAKEUP_PIN_IDX, LLWU_WAKEUP_PIN_TYPE);
LLWU_ClearExternalWakeupPinFlag(LLWU, LLWU_WAKEUP_PIN_IDX);
//IRTC Tamper0
LLWU_EnableInternalModuleInterruptWakup(LLWU, LLWU_IRTC_IDX, true);
}
Thanks in advance for your help!