#include"DSP28_Device.h"
interrupt CpuTimer0_ISR(void);
void main(void)
{
Uint16 i;
EALLOW;
SysCtrlRegs.WDCR=0x0068;
SysCtrlRegs.PLLCR=0x0006;
for(i=0;i<5000;i++);
EDIS;
EALLOW;
GpioMuxRegs.GPBMUX.bit.PWM8_GPIOB1=0;
GpioMuxRegs.GPBDIR.bit.GPIOB1=1;
EDIS;
GpioDataRegs.GPBDAT.bit.GPIOB1=0;
DINT; //INTM=1;
IER=0x00;
IFR=0x00;
InitPicCtrl(); //初始化PIE中断控制寄存器
InitPieVectTable(); //初始化PIE中断向量表
InitCpuTimer0(); //CPU定时器0初始化
EALLOW;
PieVectTable.TINT0=&CpuTimer0_ISR; //指向中断服务程序
EDIS;
ConfigCpuTime0(5000);
CpuTimer0Regs.TCR.bit.TSS=0;
PieCtrl.PIEIER1.bit.INTx7=1;
IER|=0x01;
EINT;
while(1);
}
interrupt CpuTimer0_ISR(void)
{
GpioDataRegs.GPBTOGGLE.bit.GPIOB1=1;
PieCtrl.PIEACK.bit.ACK1=1;
代码,Cputimer0进行延时500ms,GPIOB1取反一次,编译时,出现四个警告错误,具体请看以下图片!同时提示不能.out文件,恳请各位高手帮忙。。。。。。
}
|