Hello, I have a XMC4800 Relax kit and I'd like to enter in hibernate mode in order to make power saving, but without success.
My goal is enter in hibernate mode and wakeup the XMC from the alarm of the internal RTC.
Bottom there is a part of my test, there is anything wrong because xmc4800 don't enter in hibernate mode..
can you help me?
Thank You
XMC_SCU_CLOCK_EnableLowPowerOscillator();
XMC_SCU_HIB_SetRtcClockSource(XMC_SCU_HIB_RTCCLKSR C_OSI);
XMC_RTC_Init(&rtc_config); // contains alarm settings
XMC_RTC_SetTime(&rtc_time);
XMC_RTC_EnableHibernationWakeUp(XMC_RTC_WAKEUP_EVE NT_ON_ALARM);
XMC_SCU_HIB_ClearEventStatus(XMC_SCU_HIB_EVENT_WAK EUP_ON_RTC);
XMC_SCU_HIB_EnableEvent(XMC_SCU_HIB_EVENT_WAKEUP_O N_RTC);
XMC_SCU_RESET_ClearDeviceResetReason();
XMC_SCU_HIB_ClearWakeupEventDetectionStatus();
XMC_RTC_Start();
XMC_SCU_HIB_EnterHibernateState();
while(1);
My goal is enter in hibernate mode and wakeup the XMC from the alarm of the internal RTC.
Bottom there is a part of my test, there is anything wrong because xmc4800 don't enter in hibernate mode..
can you help me?
Thank You
XMC_SCU_CLOCK_EnableLowPowerOscillator();
XMC_SCU_HIB_SetRtcClockSource(XMC_SCU_HIB_RTCCLKSR C_OSI);
XMC_RTC_Init(&rtc_config); // contains alarm settings
XMC_RTC_SetTime(&rtc_time);
XMC_RTC_EnableHibernationWakeUp(XMC_RTC_WAKEUP_EVE NT_ON_ALARM);
XMC_SCU_HIB_ClearEventStatus(XMC_SCU_HIB_EVENT_WAK EUP_ON_RTC);
XMC_SCU_HIB_EnableEvent(XMC_SCU_HIB_EVENT_WAKEUP_O N_RTC);
XMC_SCU_RESET_ClearDeviceResetReason();
XMC_SCU_HIB_ClearWakeupEventDetectionStatus();
XMC_RTC_Start();
XMC_SCU_HIB_EnterHibernateState();
while(1);