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.

Serial receive is not working in F28335



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

  • I do not think loopback should be enabled if you want to receive from hyperterminal.  Just a thought.

  • actually when I enabled the loop back, I successfully got the character what i transmitted. But when I disabled the loop back then I sent the character through hyper terminal (which was supposed to be received by the receive buffer and then to be transmitted), the f28335 is not receiving any data and u can see my logic above. I designed the program such that it receive the character through hyper terminal then transmit the same but its not working fine. it is transmitting a false data