This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28335 use the sci to send data to receive data simultaneously, one minute after sending the normal, abnormal reception

Unused FIFO mode interrupts.

Baud rates: 115200

f28335 to PC :Sending 12 bytes of data every 500ms

PC to f28335: Sending 12 bytes of data every 10ms

f28335 to PC Sending ok,PC to f28335 Receiving ok.

A minute later 28335 to PC Sending ok but 28335 can't receive PC data.

void scib_fifo_init(void)
{

ScibRegs.SCICCR.all =0x0007;
ScibRegs.SCICTL1.all =0x0003;
ScibRegs.SCICTL2.bit.RXBKINTENA = 1;
ScibRegs.SCICTL2.bit.TXINTENA = 1;
ScibRegs.SCIHBAUD = 0;
ScibRegs.SCILBAUD = 39;
SciaRegs.SCICCR.bit.LOOPBKENA =0;
ScibRegs.SCICTL1.bit.TXENA = 1; // SCI transmitter enable
ScibRegs.SCICTL1.bit.RXENA = 1; // SCI receiver enable
ScibRegs.SCICTL1.bit.SWRESET = 1;
}

// Connected to PIEIER9_3 (use MINT9 and MG93 masks):
#if (G93PL != 0)
interrupt void SCIRXINTB_ISR(void) // SCI-B
{
// Set interrupt priority:
volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
IER |= M_INT9;
IER &= MINT9; // Set "global" priority
PieCtrlRegs.PIEIER9.all &= MG93; // Set "group" priority
PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
EINT;

// Insert ISR Code here.......
Uint8 rcvdat;
rcvdat = ScibRegs.SCIRXBUF.all;
if(state_machine == 0)
{
if(rcvdat == 'A')
{
state_machine = 1;
}
else
{
state_machine = 0;
}
}
else if(state_machine == 1)
{
if(rcvdat == 'A')
{
state_machine = 2;
}
else
{
state_machine = 0;
}

}
else if(state_machine == 2)
{
if(rcvdat == 'B')
{
state_machine = 3;
}
else
{
state_machine = 0;
}
}
else if(state_machine == 3)
{
if(rcvdat == 'B')
{
state_machine = 4;
}
else
{
state_machine = 0;
}
}
else if(state_machine == 4)
{
if(j<3)
{
DatLen =(DatLen|rcvdat)<<8;
j++;
}
else
{
j=0;
DatLen =DatLen|rcvdat;
state_machine=5;
}
}
else if(state_machine == 5)
{
FuncID = rcvdat;
state_machine = 6;
}
else if(state_machine == 6)
{
if(i<(DatLen-2))
{
RDATA[i] = rcvdat;
i++;
}
else
{
RDATA[i] = rcvdat;
state_machine = 7;
i = 0 ;
}
}
else if(state_machine == 7)
{
if(rcvdat == 'C')
{
state_machine = 8;
}
else
{
state_machine = 0;
}
}
else if(state_machine == 8)
{
if(rcvdat == 'C')
{
state_machine = 9;
}
else
{
state_machine = 0;
}
}
else if(state_machine == 9)
{
if(rcvdat == 'D')
{
state_machine = 10;
}
else
{
state_machine = 0;
}
}
else if(state_machine == 10)
{
if(rcvdat == 'D')
{
state_machine = 0 ;
UcStatus = 1;
}
else
{
state_machine = 0 ;
}

}

// Restore registers saved:
DINT;
PieCtrlRegs.PIEIER9.all = TempPIEIER;

// Next two lines for debug only to halt the processor here
// Remove after inserting ISR Code
//asm (" ESTOP0");
//for(;;);

}
#endif

// Connected to PIEIER9_4 (use MINT9 and MG94 masks):
#if (G94PL != 0)
interrupt void SCITXINTB_ISR(void) // SCI-B
{
// Set interrupt priority:
volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER9.all;
IER |= M_INT9;
IER &= MINT9; // Set "global" priority
PieCtrlRegs.PIEIER9.all &= MG94; // Set "group" priority
PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
EINT;

// Insert ISR Code here.......

// Restore registers saved:
DINT;
PieCtrlRegs.PIEIER9.all = TempPIEIER;

// Next two lines for debug only to halt the processor here
// Remove after inserting ISR Code
//asm (" ESTOP0");
//for(;;);

}
#endif

Anyone can help me.

Best regards.