Hello,
I am using the Tiva C in hibernation mode at remote area. It wakes up for 3 seconds every hour to work then hibernate again. The problem is that sometimes I found the controller wakes up and stuck or when it works up for 3 seconds it does not hibernate again that fully discharge the battery! I need to add a watchdog or similar code lines to restart the processor if the controller does not hibernate after certain time. Can I add this option and where in the code. My simplified code
int main(void){
//////////// I need to add here watchdog/ similar code lines, so if the program does not reach hibernate after 5 seconds wakeup it resets the processor. I do not know if it can work with like that or no ! ////////
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE,GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);
GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 , 0x08);
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
HibernateEnableExpClk(SysCtlClockGet());
HibernateGPIORetentionEnable();
//
HibernateRTCSet(0);
HibernateRTCEnable();
HibernateRTCMatchSet(0,3600);
HibernateWakeSet(HIBERNATE_WAKE_PIN | HIBERNATE_WAKE_RTC);
SysCtlDelay(48000000);
GPIOPinWrite(GPIO_PORTF_BASE,GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3, 0x00);
HibernateRequest();
}
I am open to any other ideas.
Regards,
Ahmed