This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Hibernate module

hai,

       i am currently working on the hibernate module in the tm4c123gh6pge board .the main thing is ,when the power is off that means no supply to the processor and i have connected 3.3v battery to the board .RTC time is not updated and coming from the initializing time.The code that i am working is 

ROM_HibernateEnableExpClk(SysCtlClockGet());
ROM_HibernateRTCEnable();
HibernateClockConfig(HIBERNATE_OSC_HIGHDRIVE);
HibernateIntRegister(HibernateHandler);
HibernateIntEnable(HIBERNATE_INT_RTC_MATCH_0);
HibernateWakeSet(HIBERNATE_WAKE_RTC );

//Set up counter mode for RTC
HibernateCounterMode(HIBERNATE_COUNTER_RTC );
//
// Calculate the calendar data to be written
//
calendar_write = umktime(&tm1);
if (calendar_write == (uint32_t)(-1)){
//UARTSend((uint8_t *)buf_er, sizeof(buf_er));
while(1);
}
else {
HibernateRTCSet(calendar_write);
//Set an interrupt for the RTC after one second.
HibernateRTCMatchSet(0,HibernateRTCGet()+2);
}

void HibernateHandler(void)
{
// reset interrupt flag
uint32_t ui32Status = HibernateIntStatus(1);
ROM_HibernateIntClear(ui32Status);
calendar_read = HibernateRTCGet();
ulocaltime(calendar_read, &tm2);
strftime((char *)buf_rz, 60, "%c", &tm2);
strftime(rtc_lcd_h, 4, "%H", &tm2);
strftime(rtc_lcd_m, 4, "%M", &tm2);
strftime(rtc_lcd_s, 4, "%S", &tm2);
// Keep the interrupt hapening
HibernateRTCMatchSet(0,HibernateRTCGet()+2);
}

please send the code for that problem.

  • Hello Ravi,

    Even though you have the battery connected, does the VDD Supply become 0V when in Hibernate Mode

    Things to check: Does the RTC count correctly when not in Hibernate and generate an interrupt at the desired Match Value?

    Regards
    Amit