XMC 4500 - how to enter Hibernate mode?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi,

I am using the Relax Kit with XMC4500 and I need to enter Hibernate mode and wake up on RTC events.
I tried to implement the activation of this mode as described into the User Manual but it doesn't seem to work.
The RTC itself works fine and generates events but I can't get the chip to hibernate.

I found some appnote where it says that "Note: The Internally Controlled Hibernate Mode is not supported on XMC4500 device." To use external control do I need additional components?
Has anyone done this and can give some details or share some code?

Thanks in advance
0 Likes
3 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

See an example below. You will see the HIB_IO_1 having a pulse of 5s, the duration of the hibernate.

#include 
#include
#include

XMC_RTC_CONFIG_t rtc_config =
{
.alarm.seconds = 5U,
.prescaler = 0x7fffU
};

XMC_RTC_TIME_t rtc_time =
{
.days = 0,
.daysofweek = 0,
.hours = 0,
.minutes = 0,
.month = 0,
.seconds = 0,
.year = 0
};

int main(void)
{
XMC_SCU_HIB_EnableHibernateDomain();

XMC_SCU_HIB_SetRtcClockSource(XMC_SCU_HIB_RTCCLKSRC_OSI);

XMC_RTC_Init(&rtc_config);

XMC_RTC_SetTime(&rtc_time);
XMC_RTC_EnableHibernationWakeUp(XMC_RTC_WAKEUP_EVENT_ON_ALARM);

XMC_SCU_HIB_ClearEventStatus(XMC_SCU_HIB_EVENT_WAKEUP_ON_RTC);
XMC_SCU_HIB_EnableEvent(XMC_SCU_HIB_EVENT_WAKEUP_ON_RTC);

XMC_SCU_HIB_SetPinOutputLevel(XMC_SCU_HIB_IO_1, XMC_SCU_HIB_IO_OUTPUT_LEVEL_LOW);
XMC_SCU_HIB_SetPinMode(XMC_SCU_HIB_IO_1, XMC_SCU_HIB_PIN_MODE_OUTPUT_PUSH_PULL_HIBCTRL);

XMC_SCU_RESET_ClearDeviceResetReason();
XMC_SCU_HIB_ClearWakeupEventDetectionStatus();

XMC_RTC_Start();

XMC_SCU_HIB_EnterHibernateState();

while(1U);
}
0 Likes
Not applicable
I'm currently working on the Hibernate mode. Have tried this code but this does not work for me and the description in the documents of Infineon help me unfortunately not further. Does anyone have a running code or can someone tell me what could be wrong with the code posted above?

Greetings Patrick
0 Likes
User22758
Level 1
Level 1
First solution authored
Hello,

I have the same problem, I tried to use the code below, but the xmc45 doesn't go to hibernate mode. The electronic card always consumes same current . I use XMC_SCU_HIB_IsHibernateDomainEnabled() and I have true for return value. How can i reduce the consumption of the card ?
0 Likes