Tool/software: Code Composer Studio
Hello,
I am programming F28069 device to transfer a block (256 words) of data to PC through Serial Communication Interface.
Looks like I have to put a delay between every two words as below:
for(index=0;index<256;index++)
{
SciaRegs.SCITXBUF = block_0[index] ;
DELAY_US(800);
}
otherwise there are always some data missing, less delay causes more data miss. without a delay, there are only 5 words transferred.
I wonder if this is correct. Because with fifo enabled, I don't think a delay is needed here. Plus, the baudrate setup matches between PC and the device. And the fifo is configured as follows,
void scia_init(void)
{
//fifo init
SciaRegs.SCIFFTX.all=0xE040; //SCI Reset,SCI FIFO enable,TXFIFO int clr
SciaRegs.SCIFFRX.all=0x2062; //RXFIFO int clr, RXFIFO int enable
SciaRegs.SCIFFCT.all=0x0;
//sci init
SciaRegs.SCICCR.all =0x0007; // 1 stop bit, No loopback
// No parity,8 char bits,
// async mode, idle-line protocol
SciaRegs.SCICTL1.all =0x0003; // enable TX, RX, internal SCICLK,
// Disable RX ERR, SLEEP, TXWAKE
SciaRegs.SCICTL2.all =0x0003;
SciaRegs.SCICTL2.bit.RXBKINTENA =1;
// Baud Rate ~=14400
SciaRegs.SCIHBAUD =0x0000;
SciaRegs.SCILBAUD =0x00C2;
SciaRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset
}
Can someone point out if I get anything wrong?
Thanks
Ning