Problem wakeup LLWU RTC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem wakeup LLWU RTC

488 Views
danielecortella
Contributor V


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

pastedImage_1.png

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

Labels (1)
0 Kudos
1 Reply

279 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Daniele,

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.

I was wondering if you can tell what the chip you use, then I can find some sample code for you to refer to.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos