TI中文支持网
TI专业的中文技术问题搜集分享网站

28335定时器中断进不去

#include "DSP2833x_Device.h" // Headerfile Include File
#include "DSP2833x_Examples.h" // Examples Include File
interrupt void ISRTimer0(void);
int AA=0;

int main(void)
{
InitSysCtrl();
DINT;
IER=0x0000;
IFR=0X0000;
InitPieVectTable();
InitPieCtrl();
EALLOW; // This is needed to write to EALLOW protected registers
PieVectTable.TINT0 = &ISRTimer0;
EDIS;
InitCpuTimers();
ConfigCpuTimer(&CpuTimer0,150,500000);
StartCpuTimer0();
PieCtrlRegs.PIEIER1.bit.INTx7=1;
IER|=M_INT1;
EINT;
ERTM;

}
interrupt void ISRTimer0(void)
{
AA++;
CpuTimer0Regs.TCR.bit.TIF=1;
PieCtrlRegs.PIEACK.bit.ACK1=1;
EINT;
}

赞(0)
未经允许不得转载:TI中文支持网 » 28335定时器中断进不去
分享到: 更多 (0)