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.

TMS320F28386D: SCI

Expert 2390 points
Part Number: TMS320F28386D


There is no clear unit of the SCI  RXFFIL.

Could TI provide this information?  The unit is byte or word.

  

  • The units are words, essentially the value in RxFFIL is setting the threshold for the number of words are received in the RXFIFO before this trips.

    Best,

    Matthew

  • I test it, the result show that the unit is byte.

  • I sent one byte, it will enter into the interrupt function.

    If I sent two bytes by, it will enter into the interrupt function two times.

    interrupt void sciaRxFifoIsr(void)
    Interrupt_register(INT_SCIA_RX, sciaRxFifoIsr);
    void Init_SCI_A(void){
        //
        // 8 char bits, 1 stop bit, no parity. Baud rate is 115200.
        //
        SCI_setConfig(SCIA_BASE, DEVICE_LSPCLK_FREQ, 115200, (SCI_CONFIG_WLEN_8 |
                                                            SCI_CONFIG_STOP_ONE |
                                                            SCI_CONFIG_PAR_NONE));
        SCI_enableModule(SCIA_BASE);
        SCI_resetChannels(SCIA_BASE);
        SCI_enableFIFO(SCIA_BASE);
    
        //
        // RX and TX FIFO Interrupts Enabled
        //
        SCI_enableInterrupt(SCIA_BASE, (SCI_INT_RXFF | SCI_INT_RXERR ));
        SCI_disableInterrupt(SCIA_BASE, (SCI_INT_TXFF | SCI_INT_RXRDY_BRKDT | SCI_INT_TXRDY));
    
        //
        // The transmit FIFO generates an interrupt when FIFO status
        // bits are less than or equal to 2 out of 16 words
        // The receive FIFO generates an interrupt when FIFO status
        // bits are greater than equal to 2 out of 16 words
        //
        SCI_setFIFOInterruptLevel(SCIA_BASE, SCI_FIFO_TX16, SCI_FIFO_RX1);
        SCI_performSoftwareReset(SCIA_BASE);
    
        SCI_resetTxFIFO(SCIA_BASE);
        SCI_resetRxFIFO(SCIA_BASE);
    }
  • I apologize, I think there is a naming convention discrepancy that is causing the confusion here.

    The receive FIFO is actually 10 bits wide, to allow for the parity and framing error flag bits to be saved as well.  So while the actual comms info is a byte (8 bits of data), there are 10 bits of information that are captured; so I think this is why the TRM is calling this a "word".

    This should not be confused with a word of data(16-bits) as you have shown.

    So, 1 "word" in the FIFO threshold and status registers is referring to 1 "byte" of data.

    I will admit, that the transmit FIFO is only 8 bits wide, so conceptually we could have used the word "byte" in terms of its FIFO, but likely word was used for consistency.

    In all of the above "word" is referring to 1 FIFO location, whether it is 8bits or 10bits.

    Best,

    Matthew

  • Thanks for your double confirmation.Thumbsup