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.

2035 CPU定时器

CpuTimer1.RegsAddr = &CpuTimer1Regs;
// CpuTimer2.RegsAddr = &CpuTimer2Regs;
// Initialize timer period to maximum:
CpuTimer1Regs.PRD.all = 0x752A;//0.5MS//0xEA54; //0xEA54*16.67ns=1ms
// CpuTimer2Regs.PRD.all = 0xFFFFFFFF;
//Timer1 Free Run
CpuTimer1Regs.TCR.bit.FREE = 1;
// Make sure timers are started:
CpuTimer1Regs.TCR.bit.TSS = 0;
// CpuTimer2Regs.TCR.bit.TSS = 1;
// Reload all counter register with period value:
CpuTimer1Regs.TCR.bit.TRB = 1;
// CpuTimer2Regs.TCR.bit.TRB = 1;
// Reset interrupt counters:
CpuTimer1.InterruptCount = 0;
// CpuTimer2.InterruptCount = 0;

}

我想问1:cpu_timer 怎么没有定时器工作模式设置寄存器

           2:这段程序的初始化中,定时器被禁止中断使能了,整个项目程序确实没有定时器中断函数,所以不明白中断禁止了,整个定时器初始化在这还有什么作用。