Part Number: LAUNCHXL-F28379D
Tool/software: Code Composer Studio
Hello!
I have an issue regarding SCIB transmit interrupt .
Iam able to transmit and receive characters via SCI from Launchpad to PC using interrupts.Whenever i type a character to transmit data, it gets transmitted but it is getting transmitted continously.When i enter another character,then the interrupt gets generated,and my new character is getting continously transmitted.I just want the character to be transmitted only once.Please help me.
Sorry if my English is bad. Below, I have attached my transmit ISR and fifo initialization below.
Is my transmit ISR correctly written to transmit only a single character?
Will there be any malfunction of SCI working if i dont set certain bits in an orderly way?
char SendData[];
void scib_fifo_init()
{
ScibRegs.SCICCR.all = 0x0007;
ScibRegs.SCICTL1.all = 0x0003;
ScibRegs.SCICTL2.bit.RXBKINTENA = 0;
ScibRegs.SCICTL2.bit.TXINTENA = 0;
ScibRegs.SCIFFTX.bit.SCIFFENA = 1;
ScibRegs.SCIFFTX.bit.TXFFIENA = 1;
ScibRegs.SCIFFRX.bit.RXFFIENA = 1;
ScibRegs.SCICTL1.bit.all = 0x0023;
ScibRegs.SCIFFTX.bit.TXFIFORESET = 1;
ScibRegs.SCIFFRX.bit.RXFIFORESET = 1;
ScibRegs.SCIHBAUD.all = 0x0001;
ScibRegs.SCILBAUD.all = 0x00E7; //9600 BAUD at LSPCLK = 37.5Mhz
}
interrupt void SCIBTXFIFO_ISR(void)
{
uint16_t i;
for(i=0;i<2;i++)
{
ScibRegs.SCITXBUF.all = (uint16_t)SendData[i];
}
ScibRegs.SCIFFTX.bit.TXFFINTCLR = 1;
PieCtrlRegs.PIEACK.all |= 0x100;
}