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.

EK-TM4C123GXL: Counter will not count in RTC mode.

Part Number: EK-TM4C123GXL

I haven't been able to find an example for RTC so I figure there is something wrong with my setup. I have a 32.768KHz crystal attached to PD2 and 3. The value stays at 1.

Here is the setup.

int
main(void)
{
    volatile uint64_t vg = 0;
    volatile uint64_t vg1 = 1000000LLU;

    MAP_FPULazyStackingEnable();

    MAP_SysCtlClockSet(SYSCTL_SYSDIV_2_5 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);

    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_WTIMER3);
    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);

    MAP_GPIOPinConfigure(GPIO_PD3_WT3CCP1);
    MAP_GPIOPinTypeTimer(GPIO_PORTD_BASE, GPIO_PIN_3);
    MAP_GPIOPinConfigure(GPIO_PD2_WT3CCP0);
    MAP_GPIOPinTypeTimer(GPIO_PORTD_BASE, GPIO_PIN_2);
    MAP_TimerLoadSet64(WTIMER3_BASE, vg1);

    MAP_TimerConfigure(WTIMER3_BASE, TIMER_CFG_RTC);
    //MAP_TimerEnable(WTIMER3_BASE, TIMER_A);
    TimerRTCEnable(WTIMER3_BASE);

    while(1)
    {
        vg = TimerValueGet64(WTIMER3_BASE);
        SysCtlDelay(100000);
    }
}