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:使用宽计时器生成中断

Guru**** 2382480 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1519670/tm4c123gh6pm-generating-interrupts-with-wide-timer

器件型号:TM4C123GH6PM

工具/软件:

您好:

我每64秒通过以下方式生成一个中断:

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
}

timer2_ISR 每64秒触发一次。 是否有方法可以使初始时间触发计时器62而不是64。 可能会减少/增加其初始计数器?

此致。

c.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

     您是否可以用2秒直接预加载当前的自由运行计数器、因此首次到期只需62秒?