T2CINT中断进不去,请教高手~~
// Initialize System Control registers, PLL, WatchDog, Clocks to default state:// This function is found in the DSP281x_SysCtrl.c file.
InitSysCtrl();
// HISPCP prescale register settings, normally it will be set to default values
EALLOW; // This is needed to write to EALLOW protected registers
SysCtrlRegs.HISPCP.all = 0x0000; // SYSCLKOUT/1
EDIS; // This is needed to disable write to EALLOW protected registers
// Disable and clear all CPU interrupts:
DINT;
IER = 0x0000;
IFR = 0x0000;
// Initialize Pie Control Registers To Default State
// This function is found in the DSP281x_PieCtrl.c file.
InitPieCtrl();
// Initialize the PIE Vector Table To a Known State:
// This function is found in DSP281x_PieVect.c.
// This function populates the PIE vector table with pointers
// to the shell ISR functions found in DSP281x_DefaultIsr.c.
InitPieVectTable();
// User specific functions, Reassign vectors (optional), Enable Interrupts:
// Initialize EVA Timer 1:
// Setup Timer 1 Registers (EV A)
EnableFlag=TRUE;
// Waiting for enable flag set
while (EnableFlag==FALSE)
{
BackTicker++;
}
//Enable Comper interrupt bits for GP timer 2
EvaRegs.EVAIMRB.bit.T2CINT=1;
EvaRegs.EVAIFRB.bit.T2CINT=1;
// Reassign ISRs.
// Reassign the PIE vector for T1UFINT and T2PINT to point to a different
// ISR then the shell routine found in DSP281x_DefaultIsr.c.
// This is done if the user does not want to use the shell ISR routine
// but instead wants to use their own ISR.
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.T2CINT = &HXISR;
EDIS; // This is needed to disable write to EALLOW protected registers
// Enable PIE group 3 interrupt 1 for T2CINT
PieCtrlRegs.PIEIER3.all=M_INT2;
// Enable CPU INT2 for T1UFINT and INT3 for T2CINT:
IER |=M_INT3;
请问高手,我这个中断程序为什么,T2的比较中断进不去啊?谢谢~~ 没有看到你启动EV的定时器呀?你参考一下2812的例程里面有和这个一样的例子。 我不启动EV用他的周期中断,下溢中断都是可以连续进的啊?
页:
[1]