如题,求DM6437上能运行的定时器程序? 如果能在seed-DEC7437上运行那最好不过啦。
谢谢啦 !
配置定時器的話可以參考以下Code
/*set 1us unit times*/ void timer0_init(Uint32 times) { TIMER0_TGCR = 0; TIMER0_EMUMGT = 0x0003; TIMER0_TIM12 = 0; TIMER0_TIM34 = 0; TIMER0_PRD12 = times * 27; // 1us TIMER0_PRD34 = 0; TIMER0_TGCR = (0 << 2) |//TIMMODE 64bit GP Timer (1 << 1) | //TIMER0 3:4 no reset (1 << 0); // TIMER0 1:2 no reset TIMER0_TRC = (0 << 22) | (0 << 8) | //internal clock (0 << 6) ; //one-time mode disable } void start_timer0() { TIMER0_TRC |= (1 << 6); } void stop_timer0() { TIMER0_TRC ^= (1 << 6); //disable the timer0. TIMER0_TIM12 = 0; TIMER0_TIM34 = 0;// clear count value }
http://blog.csdn.net/gzzaigcnforever/article/details/16971181,下面还有一些说明 ,可以看看。