Hello,
I am using the scia_loopback example in control suite, and have made a small addition to the code as follows
for(;;)
{
**while(SciaRegs.SCIRXST.bit.RXRDY != 1){}
**while(SendChar <= 0x00FF)
**{
Breakpointscia_xmit(SendChar);
Breakpoint**while(SciaRegs.SCIFFRX.bit.RXFFST !=1) { } // wait for RRDY/RXFFST =1 for 1 data available in FIFO
// Check received character
Breakpoint ReceivedChar = SciaRegs.SCIRXBUF.all;
if(ReceivedChar != SendChar) error();
// Move to the next character and repeat the test
SendChar++;
// Limit the character to 8-bits
SendChar &= 0x00FF;
LoopCount++;
**}
**SendChar=0;
}
The lines beginning with a ** indicate insertions on my part.
What I expect it to do is, instead of sending the same sequence of words repeatedly, to wait for a symbol to be transmitted from my PC terminal. which, I believed will be flagged by the SCIFFRXST going from 0 to 1. However, when I send a symbol from my terminal application, I get an indicator in hardware on the PC side that the bit has been sent, but the DSP module does not respond.
I presume that the SCI module is capable of communication in either direction; why else would it be programmed otherwise when loopback is a desired function? There must be something I have not Can someone please point me in the right direction on this?
Thanks for reading,
Tim