#include "DSP281x_Device.h"
#include "DSP281x_Examples.h"
//SPWM输出 对象 PWMDAC
pwmdac_3=PWMDAC_DEFAULTS; //source file:DSP281x_PwmDac.h
interrupt void evb_t3up_isr();
void main() {
//
DINT;
//
InitSysCtrl(); //source files:DSP281x_GlobalPrototypes.h---DSP281x_SysCtrl.c
//
InitGpio(); //source files:DSP281x_GlobalPrototypes.h---DSP281x_Gpio.c
//
IER=0x0000;
IFR=0x0000;
//
InitPieCtrl(); //source files:DSP281x_GlobalPrototypes.h---DSP281x_PieCtrl.c
InitPieVectTable(); //source files:DSP281x_GlobalPrototypes.h---DSP281x_PieVect.c
//
EALLOW;
//
//PieVectTable.T3UFINT = &evb_t3up_isr(); //you'll see it in (2)
EDIS;
//
PieCtrlRegs.PIEIER4.bit.INTx6=1; //T3UFINT
PieCtrlRegs.PIEIFR4.bit.INTx6=1;
//
pwmdac_3.PeriodMax=3750;
//初始化PWMDAC输出
F281X_EV2_PWMDAC_Init(&pwmdac_3);
//source file:DSP281x_PwmDac.h----DSP281x_PwmDac.c
}
interrupt void evb_t3up_isr() {
sgen.calc(&sgen);
x11=sgen.out1;
x12=sgen.out2;
x13=sgen.out3;
F281X_EV2_PWMDAC_Update(&pwmdac_3);
//source files:DSP281x_PwmDac.h----DSP281x_PwmDac.c
KickDog();
//source files:DSP281x_GlobalPrototypes.h----DSP281x_SysCtrl.c
EvbRegs.EVBIFRA.all=0x0200;
PieCtrlRegs.PIEACK.bit.ACK4=1;
}