#include "DSP2833x_Device.h" // DSP2833x Headerfile Include File
#include "DSP2833x_Examples.h" // DSP2833x Examples Include File
void Init_Gpio(void)
{ EALLOW;
GpioCtrlRegs.GPAMUX1.all=0x0000;
GpioCtrlRegs.GPADIR.all=0xffff;
EDIS;
}
interrupt void Scib_init(void)
{ GpioDataRegs.GPADAT.all=ScicRegs.SCIRXBUF.all;
PieCtrlRegs.PIEACK.all=PIEACK_GROUP8;
}
void Init_Sci(void)
{
EALLOW;
InitSysCtrl();
InitSciGpio();
InitPieCtrl();
EDIS;
EALLOW;
ScicRegs.SCIHBAUD=0x01;
ScicRegs.SCILBAUD=0xe7;
ScicRegs.SCICCR.bit.SCICHAR=7;
ScicRegs.SCICCR.bit.STOPBITS=0;
ScicRegs.SCICCR.bit.PARITYENA=0;
ScicRegs.SCICTL1.bit.RXENA=1;
ScicRegs.SCICTL2.bit.RXBKINTENA=1;
PieVectTable.SCIRXINTC=&Scib_init;
ScicRegs.SCICTL1.bit.SWRESET=1;
EDIS;
DINT;
IER=0x0000;
IFR=0x0000;
PieCtrlRegs.PIECTRL.bit.ENPIE=1;
PieCtrlRegs.PIEIER8.bit.INTx5=1;
IER|=M_INT8;
EINT;
ERTM;
}
void main(void)
{ Init_Gpio();
Init_Sci();
GpioDataRegs.GPADAT.all=0xffff;
while(1);
}