Hi all,
I am using F28335 controller and code composer studio v3.3. I need help for receiving a data from hyper terminal. I am successful in transmitting the data but I couldn't receive any character in the receive buffer via hyper terminal.
My sample code is here
SciaRegs.SCICCR.all =0x0007; // 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.TXINTENA =1;
SciaRegs.SCICTL2.bit.RXBKINTENA =1;
SciaRegs.SCIHBAUD =0x0001;
SciaRegs.SCILBAUD =0x00E7;
SciaRegs.SCICCR.bit.LOOPBKENA =1; // Enable loop back
SciaRegs.SCICTL1.all =0x0023; // Relinquish SCI from Reset
SciaRegs.SCIFFTX.all=0xE040;
SciaRegs.SCIFFRX.all=0x204f;
SciaRegs.SCIFFCT.all=0x0;
recieve();
scia_xmit(65);
rcv=(int)ReceivedChar;
scia_xmit(rcv);
void scia_xmit(int a)
{
while (SciaRegs.SCIFFTX.bit.TXFFST != 0) {}
SciaRegs.SCITXBUF=a;
}
void recieve(void)
{
while(SciaRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for RRDY/RXFFST =1 for 1 data available in FIFO
ReceivedChar = SciaRegs.SCIRXBUF.all;
}
I have also tried loop back testing and its working fine but I dont know why its not working when i m trying it without loopback. I am sending a character through hyperterminal but the receive buffer is not receiving it. Plz help .......
Regards
Habib ali