新手求助:28335 CPU timer 中断服务函数问题
TI 提供的Example 中:interrupt void cpu_timer0_isr(void)
{
CpuTimer0.InterruptCount++;
// Acknowledge this interrupt to receive more interrupts from group 1
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;
}
interrupt void cpu_timer1_isr(void)
{
CpuTimer1.InterruptCount++;
// The CPU acknowledges the interrupt.
EDIS;
}
interrupt void cpu_timer2_isr(void)
{EALLOW;
CpuTimer2.InterruptCount++;
// The CPU acknowledges the interrupt.
EDIS;
}
1、为什么0没有EALLOW/EDIS语句,而1中只有EDIS,2中有EALLOW/EDIS语句???
2、TCR寄存器中的中断标志位TIF是否需要在中断服务函数中软件清零??
谢谢解答 代码中我觉得都是随便写的吧 需要保护的寄存器请查看想datasheet
中断标志如果中断后要求是需要软件去清除而不是自动清楚的
在中断中是需要清楚的不然无法进入下一次中断 楼主@pandabin在不在呢
页:
[1]