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.

TMS320f28035 SCI

Other Parts Discussed in Thread: TMS320F28035

I am trying to use the TMS320F28035 SCI port. I have the Transmit working great with the FIFO enabled. However, I can not get the RXRDY bit to go high when I receive data. I can see that the Receive buffer has the data I am sending from my PC in it and I can see the Receive FIFO SciaRegs.SCIFFRX.bit.RXFFST is incrementing as each byte is received. But, the RXRDY bit never goes high. Is this bit supposed to go high even when using the FIFO?

 

My SCI setup code is as follows after a power on reset:

 

               SciaRegs.SCICCR.bit.SCICHAR = 7;  // 8 bits, No Parity, one stop bit

               SciaRegs.SCICTL1.bit.SWRESET = 1; // Enable SCI

               SciaRegs.SCICTL1.bit.TXENA = 1;   // Connect TX to output

               SciaRegs.SCIHBAUD = 0x00;    // Set Baud to 115,200 bits/sec  LSPCLK/((BRR + 1) * 8)

               SciaRegs.SCILBAUD = 0x40;         // Actual Baud is 115,385 bits/sec

               SciaRegs.SCICTL1.bit.RXENA = 1;

               SciaRegs.SCIFFTX.bit.SCIRST = 0;

               SciaRegs.SCIFFTX.bit.TXFIFOXRESET = 0;             

               SciaRegs.SCIFFTX.bit.TXFIFOXRESET = 1;

               SciaRegs.SCIFFTX.bit.SCIFFENA = 1;

               SciaRegs.SCIFFCT.bit.FFTXDLY = 0;

               SciaRegs.SCIFFTX.bit.SCIRST = 1;

 

I can probably get my code to work by triggering when the RXFFST is > 0, but I would like to understand why the RXRDY bit does not go high.

  • I believe RXRDY only goes high when you set the RX/BK INT ENA in SCICTL2.  I don't suggest using that bit though.  Instead, you should program a threshold into SCIFFRX.RXFFIL (e.g. 1 if you want an interrupt any time a sample is ready), set RXFFIENA and poll for RXFFINT.

  • Gary, Brad,

    RXRDY is used for Non-FIFO mode.  RXFFST is used for FIFO mode.

    RXRDY is not supposed to go high when using FIFO.

    You don't need to enable interrupts to get these flags updated.  These flags will get updated irrespective of interrupt enable/disable status.

    Regards,
    Vamsi

  •  

    Thanks for clearing this up for me. I was having trouble diciphering this from the Users Manual.

    The below if statement is working great. My received data is very slow so all I do is poll the RX port via the if statement.

     if(SciaRegs.SCIFFRX.bit.RXFFST > 0)

     

    Regards,

    Gary