#define TIMER_CTRL TIMER_TCR_RMK(\
TIMER_TCR_IDLEEN_DEFAULT, /* IDLEEN == 0 */ \
TIMER_TCR_FUNC_OF(0), /* FUNC == 0 */ \
TIMER_TCR_TLB_RESET, /* TLB == 1,timer loading is enabled*/ \
TIMER_TCR_SOFT_BRKPTNOW, /* SOFT == 0 */ \
TIMER_TCR_FREE_WITHSOFT, /* FREE == 0 */ \
TIMER_TCR_PWID_OF(0), /* PWID == 0 */ \
TIMER_TCR_ARB_RESET, /* ARB == 1 */ \
TIMER_TCR_TSS_START, /* TSS == 0 */ \
TIMER_TCR_CP_PULSE, /* CP == 0 */ \
TIMER_TCR_POLAR_LOW, /* POLAR == 0 */ \
TIMER_TCR_DATOUT_0 /* DATOUT == 0 */ \
)
/* Create a TIMER configuration structure that can be passed */
/* to TIMER_config CSL function for initialization of Timer */
/* control registers. */
TIMER_Config timCfg0 = {
TIMER_CTRL, /* TCR0 */
// 0x0420,
0x3400u, /* PRD0 */
0x0000 /* PRSC */
};
1、上述为Timer实验中TCR寄存器的配置,上述配置的值代表的应该是初始化Timer时,各寄存器中的状态吧?
2、文档中在说明初始化寄存器时,第一步是确保定时器停止,即TSS=1。那为什么上述TCR寄存器配置中TSS=0?
3、我把TSS配置改为TIMER_TCR_TSS_STOP, 即TSS=0,发现程序正常运行,那这样的话,TCR寄存器中各位的值,何时配置成0或1?
|