打印

请教关于合众达示例程序中2812定时器寄存器TCR定义的问题

[复制链接]
2321|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
jlsong1983|  楼主 | 2008-10-29 18:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请教关于合众达示例程序中2812定时器寄存器TCR定义的问题
请教关于合众达示例程序中2812定时器寄存器TCR定义的问题
合众达的用户指南中说2812的CPU定时器详细说明参考TMS320F28x DSP CPU and Instruction Set Reference Guide,而我在该手册中并未发现对定时器的说明。在手册TMS320F28x Control and Interrupts Reference Guide (Rev. A)中发现对TCR定时器寄存器的定义9-6位都是保留位,而合众达程序DSP28_CpuTimer.h中却定义为:
struct  TCR_BITS {        // bits  description
   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
}; 
并且在DSP28_CpuTimer.c的函数ConfigCpuTimer()中对9-6位都进行了赋值,如下:
        Timer->RegsAddr->TCR.bit.FRCEN = 0;    // Force output enable (not used)
        Timer->RegsAddr->TCR.bit.PWIDTH = 7;   // 7+1 = 8 SYSCLKOUT cycle pulse width 
请问9-6位的定义究竟是怎样的含义?究竟哪个参考手册有针对TCR寄存器的权威说明

相关帖子

沙发
JohnnyShIne| | 2011-10-7 15:34 | 只看该作者
等回复啊!

使用特权

评论回复
板凳
zhaozhijian1226| | 2011-10-8 21:43 | 只看该作者
我用的也是合众达的,但是定义如下:
struct  TCR_BITS {          // bits  description
   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
};
不知道你的是什么原因。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

57

主题

90

帖子

1

粉丝