NWPU_CHEN 发表于 2014-10-11 13:02
相关代码
void main ( )
{
enum key_val
{ Forward=1,Back,Track,Fix,Light,Spot,PosiNeg,VerHeriz,
StartP,EndP,Needle,Gun
};
InitSysCtrl( ); // 初始化 系统初始化 禁狗 sysclkout=60 hspclk=30 lspclk=15
DINT;
InitPieCtrl();
IER=0x0000;
IFR=0x0000;
InitPieVectTable(); //初始化pie中断向量
InitParameter( ); //标志位
Initperipheral( ); //ADC,EV,SPI,SCIB,TIMER0,GPIO,MAX7219,CAP1,2,4,5,T1PWM,T2PWM,T3PWM,T4PWM,
//启动CPU定时器0
First_Initial_MAX7219( );
InitProcess( );
for(i = 0; i < 8; i++) //初始化数据变量
{
Sci_VarRx = 0;
}
i = 0;
j = 1;
Send_Flag = 0;
PieCtrl.PIEIER9.bit.INTx1=1; //使能PIE模块中的SCI接收中断
PieCtrl.PIEIER9.bit.INTx2=1; //使能PIE模块中的SCI发送中断
IER|=M_INT9; //开CPU中断
EINT; //开全局中断
ERTM; //开全局实时中断
for(;;)
{
//等待中断
}
}
PieCtrl.PIEIER1.bit.INTx7=1;
PieCtrl.PIEIER9.bit.INTx3=1;
// 调试CAP中断用
PieCtrl.PIEIER5.bit.INTx5=1;
PieCtrl.PIEIER5.bit.INTx6=1;
PieCtrl.PIEIER3.bit.INTx5=1;
PieCtrl.PIEIER3.bit.INTx6=1;
// 调试cap中断时,使用,定时开始,存数。。
EvaRegs.T1CON.bit.TENABLE=1;
EvbRegs.T3CON.bit.TENABLE=1;
EvbRegs.T4CON.bit.TENABLE=1;
EvaRegs.T2CON.bit.TENABLE=1;
问题就显示出现在后面中断那几句 |