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.

TM4C123gh6pm Hibernate RTC interrupt handler issue

Other Parts Discussed in Thread: TM4C123GH6PM

Hello,

I am using  the TM4C123gh6pm evaluation board along with CCS 6.1.2 and Tivaware 2.1.2.111.  I am trying to set up the hibernate module as an RTC (No hibernation) using the internal oscillator to generate an interrupt every ten seconds.

My program never gets to the interrupt handler and  debugging shows that at match  HIB_MIS_RTCALT0 and HIB_IC_RTCALT0 are set, so I assume the interrupt is cleared as soon as its triggered. How do I avoid this from happening?

Registers:

Code:

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include  <time.h>
#include "inc/tm4c123gh6pm.h"
#include "inc/hw_memmap.h"
#include "inc/hw_types.h"
#include "driverlib/gpio.h"
#include "driverlib/interrupt.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/sysctl.h"
#include "driverlib/systick.h"
#include "driverlib/timer.h"
#include "driverlib/debug.h"
#include "driverlib/hibernate.h"
#include "utils/ustdlib.h"

int main(void) {

		SysCtlClockSet(SYSCTL_SYSDIV_2_5|SYSCTL_USE_PLL|SYSCTL_OSC_MAIN|SYSCTL_XTAL_16MHZ);		//Clock @ 80MHz

		SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
		SysCtlDelay(3);

		HibernateEnableExpClk(SysCtlClockGet());

		HibernateClockConfig(HIBERNATE_OSC_LFIOSC);

		HibernateRTCEnable();

		HibernateRTCSet(0);

		HibernateRTCMatchSet(0,HibernateRTCGet()+10);

		HibernateRTCSSMatchSet(0,0);

		IntMasterEnable();

		HibernateIntEnable(HIBERNATE_INT_RTC_MATCH_0);
		HibernateIntClear(HIBERNATE_INT_PIN_WAKE | HIBERNATE_INT_LOW_BAT |HIBERNATE_INT_RTC_MATCH_0);
		HibernateRTCTrimSet(0x7FFF);

	while(1)
	{
	}
}


void Hibernate_Handler(void)
{

	uint32_t ui32Status;

	ui32Status = HibernateIntStatus(1);
	HibernateIntClear(ui32Status);

	HibernateRTCSet(0);

	HibernateRTCMatchSet(0,HibernateRTCGet()+10);

}