2 yhc1991 yhc1991 于 2014.12.16 17:13 提问

ARM定时器首次进入中断后不退出

request_irq(IRQ_TIMER1,time2_interrupt , IRQF_DISABLED | IRQF_TIMER, " Timer1 Tick", NULL);

void clear_irq( )
{

(*(volatile unsigned long *) CTRL1) &= ~(1<<15); //清楚中断标记
}

static irqreturn_t time2_interrupt(int irq, void dev_id )
{

//(
(volatile unsigned long ) ROTCTRL) &= ~(1<<27);//关闭定时器2
//(
(volatile unsigned long *) CTRL1) &= ~(1<<14);//禁止中断
//writel(0x004b,IO_ADDRESS(HW_TIMROT_TIMCTRL2));

printk("FIQHAPPEN:%08x\n",FIQCT);
clear_irq( );
writel(0x4ffff,IO_ADDRESS(HW_TIMROT_FIXED_COUNT1));
// (*(volatile unsigned long *) CTRL1) |= (1<<14); //使能中断
return IRQ_HANDLED;
}
申请定时器中断后,进如中断处理程序后,不能退出,一直执行打印语句。打印状态显示中断标记位未清除,这是怎么回事?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!