s3c44b0 timer0进不了中断

[复制链接]
1964|0
 楼主| jplzl 发表于 2010-11-9 14:21 | 显示全部楼层 |阅读模式
void init_timer0(void)
{
INTCON = 0x01;     //vector IRQ mode,IRQ enable,FIQ reserved
INTMOD = 0x00000000;  //all interrupt IRQ mode
INTMSK = ~TIMER0_MSK;  //mask all except timer0
I_PSLV = 0x1b1b1b1b;   //timer0 1st priority of mGC others initial
I_PMST = 0x011163;    //operating mode=fix mode mGC=1st priority
_ISR_TIMER0 = (unsigned)timer0_interrupt;
TCFG0  = TCFG0_val;
TCFG1  = TCFG1_val;
TCNTB0 = TCNTB0_val;
TCMPB0 = TCMPB0_val;
TCON  = 0x6;
TCON   = 0x19;
}

void __irq timer0_interrupt(void)
{
I_ISPC = 0xffffffff;   //clear all intrrupt pending
light_black = !light_black;
}

主要代码如上啊,就是进不了中断
您需要登录后才可以回帖 登录 | 注册

本版积分规则

43

主题

236

帖子

2

粉丝
快速回复 在线客服 返回列表 返回顶部