您好,用startware的定时器例程(64位模式),设置LSB与MSB定时周期并触发中断,发现一个计数周期内会进入两次中断,比如LSB = 0x0D970100(1s),MSB = 1,会在1s先进入一次中断,然后18s再进入一次中断,以此往复,请问我想利用定时器直接20s触发一个中断怎么设置,谢谢。
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.
您好,用startware的定时器例程(64位模式),设置LSB与MSB定时周期并触发中断,发现一个计数周期内会进入两次中断,比如LSB = 0x0D970100(1s),MSB = 1,会在1s先进入一次中断,然后18s再进入一次中断,以此往复,请问我想利用定时器直接20s触发一个中断怎么设置,谢谢。
你们是在讨论64bit模式有问题吗,参考下面贴子:
https://e2echina.ti.com/question_answer/dsp_arm/c6000_dsp/f/32/p/162293/484611#484611
把对TGCR的配置改成下面就没有问题了。
static void TimerSetUp64Bit(void)
{
/* Configuration of Timer */
// TimerConfigure(SOC_TMR_2_REGS, TMR_CFG_64BIT_CLK_INT);
TimerConfigure(SOC_TMR_2_REGS, 3);
/* Set the 64 bit timer period */
TimerPeriodSet(SOC_TMR_2_REGS, TMR_TIMER12, TMR_PERIOD_LSB32);
TimerPeriodSet(SOC_TMR_2_REGS, TMR_TIMER34, TMR_PERIOD_MSB32);
}
也就是new timer plus feature好像有点问题,那就先disable new timer feature吧。