新手 求助
Timer->RegsAddr->TCR.bit.POL = 0;Timer->RegsAddr->TCR.bit.POL = 0;
Timer->RegsAddr->TCR.bit.FRCEN = 0;
Timer->RegsAddr->TCR.bit.PWIDTH = 7;
这四句是什么意思,作用是什么,我在TCR 寄存器中好像没有看见这些位啊, 它们是那些保留位吗? 看了一下相关的datasheet确实没有看到这些位
Timer应该还表明是1还是2吧
你到你工程的头文件中看看 这个.bit下结构体中按顺序
你使用的这些bit对应寄存器中的bit位
在对比一下datasheet中的寄存器
欢迎新朋友 还望对对支持 我用的是2812芯片,定时器我用的是定时器0,头文件中,他是这样定义的structTCR_BITS { // bitsdescription
Uint16 OUTSTS:1; // 0 Current state of TOUT
Uint16 FORCE:1; // 1 Force TOUT
Uint16 POL:1; // 2 Output polarity
Uint16 TOG:1; // 3 Output toggle mode
Uint16 TSS:1; // 4 Timer Start/Stop
Uint16 TRB:1; // 5 Timer reload
Uint16 FRCEN:1; // 6 Force enable
Uint16 PWIDTH:3; // 9:7 BitTOUT output pulse width
Uint16 SOFT:1; // 10 Emulation modes
Uint16 FREE:1; // 11
Uint16 rsvd:2; // 12:13 reserved
Uint16 TIE:1; // 14 Output enable
Uint16 TIF:1; // 15 Interrupt flag
};
我查看的书中好像0-3、6-7、8-9和12-13位是保留的,难道用户自己也可以编译,操作吗?
页:
[1]