Hello i have a problem to wakeup the device with the RTC. I put this in VLLS1 with this command
| POWER_SYS_SetWakeupPin(kPowerManagerWakeupPin14, kLlwuExternalPinRisingEdge, &PLUVIOMETRO_GPIO_InpConfig0[0].config); |
| POWER_SYS_SetWakeupModule(kPowerManagerWakeupModule5, TRUE); |
#ifdef DEBUG
| debug_printf("GOING IN LOW POWER\r\n"); |
#endif
| error = CLOCK_SYS_UpdateConfiguration(2, kClockManagerPolicyAgreement); |
| i = CLOCK_SYS_GetCoreClockFreq(); |
| POWER_SYS_SetMode(2, kPowerManagerPolicyAgreement); |
where the POWER_SYS_SetMode(2, kPowerManagerPolicyAgreement); set the VLLS1

and the llwu interrupt is written as is:
void PWR_Man_llwuIRQHandler(void)
{
POWER_SYS_SetMode(0, kPowerManagerPolicyAgreement);
CLOCK_SYS_UpdateConfiguration(0, kClockManagerPolicyAgreement);
if(POWER_SYS_GetWakeupPinFlag(kLlwuWakeupPin14)){
POWER_SYS_ClearWakeupPinFlag(kLlwuWakeupPin14);
flag_pioggia = true;
impulsi_pioggia++;
}
if(POWER_SYS_GetWakeupModuleFlag(kLlwuWakeupModule5)){
NVIC_ClearPendingIRQ(RTC_IRQn);
RTC_DRV_GetDatetime(RTCTimer_IDX, &DataTime);
if(!(DataTime.minute % 15)){
flag_transmit = TRUE;
flag_newdata = TRUE;
}else{
flag_newdata = TRUE;
}
}
PMC_REGSC = PMC_REGSC_ACKISO(1);
//NVIC_SystemReset();
}
with the Pin14 i don't have problem to wake-up before the RTC allarm was execute but with the RTC it crash and i can't wake-up the device. I don't understand why....
Thanks