I have the stock Stellaris Eval Kit EKS-LM4F232 and am trying to get the RTC counter to work. My code is:
SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);
GPIOPinConfigure(GPIO_PB4_T1CCP0);
GPIOPinTypeTimer(GPIO_PORTB_BASE, GPIO_PIN_4);
TimerConfigure(TIMER1_BASE, TIMER_CFG_32_RTC);
TimerRTCEnable(TIMER1_BASE);
TimerEnable(TIMER1_BASE, TIMER_A);
TimerLoadSet(TIMER1_BASE, TIMER_A, 45);
while(1)
{
delay_ms(1000);
diag_printf("RTC Count: %d\n", TimerValueGet(TIMER1_BASE, TIMER_A) );
}
I've looked at some other processor examples and the data sheet and have been trying to piece it together. I Load it with a value of 45 and do see the 45 but it never changes. I want it to use the 32KHz crystal that comes on the board.
Thanks,
Bill