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: generating interrupts with wide timer

Part Number: TM4C123GH6PM


Tool/software:

Hello,

I am generating a interrupt each 64 seconds via:

void init_timer2_rtc_trim(void) {
    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_WTIMER2);
    MAP_TimerConfigure(WTIMER2_BASE, TIMER_CFG_A_PERIODIC);
    MAP_TimerLoadSet64(WTIMER2_BASE, ((uint64_t) ui32SysClkFreq * 64));
    TimerIntRegister(WTIMER2_BASE, TIMER_A, timer2_isr);
    MAP_IntEnable(INT_WTIMER2A);
    MAP_TimerIntEnable(WTIMER2_BASE, TIMER_TIMA_TIMEOUT);
    MAP_TimerEnable(WTIMER2_BASE, TIMER_A); // trigger
}

and timer2_isr triggers each 64 seconds. is there a way to make the initial time to trigger the timer 62 instead of 64. maybe decrease / increase its initial counter?

Best Regards.

C.