|
求高手点拨:ARMulator 中如何使用定时器?
[复制链接]
我按照《ADS_DEBUGTARGETGUIDE_D.PDF》写了 Timer1 的初始化函数,但是不知道怎样关联中断处理函数了。请高手点拨,呵呵:
#define CLK 20000000
#define TimerBase 0x0a800000
#define Timer1Load (*((volatile unsigned long *)(TimerBase)))
#define Timer1Value (*((volatile unsigned long *)(TimerBase + 0x04)))
#define Timer1Control (*((volatile unsigned long *)(TimerBase + 0x08)))
#define Timer1Clear (*((volatile unsigned long *)(TimerBase + 0x0C)))
Timer1Load = CLK/OS_TICKS_PER_SEC;
Timer1Control = 0x00000000;
Timer1Control |= 0xC0;
|
|