This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

f28035 中断初始化,程序不理解



void PieVectTableInit(void)
{
int16 i;
PINT *Dest = &PieVectTable.TINT1; //这是声明一个中断类型的函数变量,并给这个指针函数 赋值,并将PieVectTable.TINT1的地址赋给 *Dest

EALLOW;
for(i=0; i < 115; i++)
*Dest++ = &ISR_ILLEGAL;  //ISR_ILLEGAL是一个空的中断函数,这个的意思是不是 在PieVectTable.TINT1这个地址开始,对115个地址进行初始时,着115个地址都是指向这个ISR_ILLEGAL,空中断函数,这样做有什么意义啊??
EDIS;

// Enable the PIE Vector Table
PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
}

  • chun.,

    从程序上看确实就是对INT1之后的中断向量给个初值。它的意义是,对那些没有使用到的中断向量给个入口,当程序中没有使用这些中断,但是却因为某些意外触发这些中断,则进入非法中断ISR ILLEGAL进行处理。

    Eric