TI中文支持网
TI专业的中文技术问题搜集分享网站

C6713的Timer的使用

请教一下,下面的程序能实现C6713的1s的定时么?

//stop the timer
*(unsigned volatile int *)TIMER0_CTRL &= 0xff3f;

//set the work mode
/* Use CPU CLK/4 */
*(unsigned volatile int *)TIMER0_CTRL |= 0x200;

//set the period
*(unsigned volatile int *)TIMER0_PRD |= 0xffffffff;

//start the timer
*(unsigned volatile int *)TIMER0_CTRL |= 0xC0;

//the number of timer input clock cycles to count 
number = *(unsigned volatile int *)TIMER0_COUNT;

timer=1000000*225/4;
while ((number – *(unsigned volatile int *)TIMER0_COUNT) < timer);

Denny%20Yang99373:

http://www.deyisupport.com/question_answer/dsp_arm/c6000_dsp/f/32/t/117698.aspx

赞(0)
未经允许不得转载:TI中文支持网 » C6713的Timer的使用
分享到: 更多 (0)