Other Parts Discussed in Thread: EK-TM4C1294XL, TM4C1237H6PZ
Hello,
I am using a custom board. I want to hibernate my device periodically after every 15 seconds using RTC. Please go through the code below. Is this the correct way to meet my requirement?
Program flow doesn't reach the point where I am switching off the led.
Here's my code->
ui32SysClock = MAP_SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN |
SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOK);
GPIOPinTypeGPIOOutput(GPIO_PORTK_BASE, GPIO_PIN_4); //led pin
GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_4, GPIO_PIN_4); //led on
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE);
SysCtlDelay(64000000);
HibernateRTCSet(0);
HibernateRTCEnable();
HibernateRTCMatchSet(0,15);
HibernateWakeSet( HIBERNATE_WAKE_RTC);
GPIOPinWrite(GPIO_PORTK_BASE,GPIO_PIN_4, 0x00); //led off
HibernateRequest();
while(1) { }