#include "DSP28x_Project.h"
//extern Uint16 RamfuncsLoadStart
//extern Uint16 RamfuncsLoadEnd
//extern Uint16 RamfuncsRunStart
interrupt void xint1_isr(void)
int main(void)
{
InitSysCtrl()
EALLOW
GpioCtrlRegs.GPBMUX1.bit.GPIO34 = 0
GpioCtrlRegs.GPBDIR.bit.GPIO34 = 1
GpioDataRegs.GPBDAT.bit.GPIO34 = 0
EDIS
DINT
InitPieCtrl()
IER = 0x0000
IFR = 0x0000
InitPieVectTable()
// MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart)
// InitFlash()
EALLOW
PieVectTable.XINT1 = &xint1_isr
EDIS
EALLOW
GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 0
GpioCtrlRegs.GPADIR.bit.GPIO12 = 0
GpioCtrlRegs.GPAQSEL1.bit.GPIO12 = 0
GpioIntRegs.GPIOXINT1SEL.bit.GPIOSEL = 12
XIntruptRegs.XINT1CR.bit.POLARITY = 0
XIntruptRegs.XINT1CR.bit.ENABLE = 1
EDIS
PieCtrlRegs.PIEIER1.bit.INTx4 = 1
PieCtrlRegs.PIECTRL.bit.ENPIE = 1
IER |= M_INT1
EINT
while(1)
{
}
}
interrupt void xint1_isr(void)
{
if(GpioDataRegs.GPADAT.bit.GPIO12 == 0)
{
GpioDataRegs.GPBDAT.bit.GPIO34 =~ GpioDataRegs.GPBDAT.bit.GPIO34
}
PieCtrlRegs.PIEACK.all = PIEACK_GROUP1
}