请教关于合众达示例程序中2812定时器寄存器TCR定义的问题
请教关于合众达示例程序中2812定时器寄存器TCR定义的问题<br />请教关于合众达示例程序中2812定时器寄存器TCR定义的问题<br />合众达的用户指南中说2812的CPU定时器详细说明参考TMS320F28x DSP CPU and Instruction Set Reference Guide,而我在该手册中并未发现对定时器的说明。在手册TMS320F28x Control and Interrupts Reference Guide (Rev. A)中发现对TCR定时器寄存器的定义9-6位都是保留位,而合众达程序DSP28_CpuTimer.h中却定义为:<br />struct TCR_BITS { // bits description<br /> Uint16 OUTSTS:1; // 0 Current state of TOUT<br /> Uint16 FORCE:1; // 1 Force TOUT<br /> Uint16 POL:1; // 2 Output polarity<br /> Uint16 TOG:1; // 3 Output toggle mode<br /> Uint16 TSS:1; // 4 Timer Start/Stop<br /> Uint16 TRB:1; // 5 Timer reload<br /> Uint16 FRCEN:1; // 6 Force enable<br /> Uint16 PWIDTH:3; // 9:7 BitTOUT output pulse width<br /> Uint16 SOFT:1; // 10 Emulation modes<br /> Uint16 FREE:1; // 11<br /> Uint16 rsvd:2; // 12:13 reserved<br /> Uint16 TIE:1; // 14 Output enable<br /> Uint16 TIF:1; // 15 Interrupt flag<br />}; <br />并且在DSP28_CpuTimer.c的函数ConfigCpuTimer()中对9-6位都进行了赋值,如下:<br /> Timer->RegsAddr->TCR.bit.FRCEN = 0; // Force output enable (not used)<br /> Timer->RegsAddr->TCR.bit.PWIDTH = 7; // 7+1 = 8 SYSCLKOUT cycle pulse width <br />请问9-6位的定义究竟是怎样的含义?究竟哪个参考手册有针对TCR寄存器的权威说明 等回复啊! 我用的也是合众达的,但是定义如下:structTCR_BITS { // bitsdescription
Uint16 rsvd1:4; // 3:0 reserved
Uint16 TSS:1; // 4 Timer Start/Stop
Uint16 TRB:1; // 5 Timer reload
Uint16 rsvd2:4; // 9:6 reserved
Uint16 SOFT:1; // 10 Emulation modes
Uint16 FREE:1; // 11
Uint16 rsvd3:2; // 12:13 reserved
Uint16 TIE:1; // 14 Output enable
Uint16 TIF:1; // 15 Interrupt flag
};
不知道你的是什么原因。
页:
[1]