|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
刚开始学习中断。下面程序为什么没有产生MR0匹配中断;请指教。谢啦
#include"LPC2103.h"
#include <math.h>
unsigned int c,d;
void TIME0_Isr(void) __irq // for external interrupt 0
{
T0IR = 0x000000ff;
}
void init_time0(void)
{
T0TCR = 0X00000000;
T0CTCR = 0X00000000;
T0TC = 0X00000000;
T0IR = 0x000000ff;
T0MR0 = 0x10;
T0MCR = 0x03;
VICIntEnClr = 0XFFFFFFFF;
VICVectAddr0 = (unsigned int)&TIME0_Isr;
VICVectCntl0 = 0x24;
VICIntEnable = 0x10;
T0TCR = 0X00000001;
}
int main(void)
{
init_time0();
while(1)
{
;
}
} |
|