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.

28335: Samll FIFO in SCI

Hi,

The SCI FIFO in 28335 contains only 16 bytes.

How can I receive\send a 256 bytes message without loosing bytes ?

Should I use DMA ?

Thanks.

 

 

  • Zvi -

    First of all, you cannot use the DMA with the SCI - if you notice the functional block diagram in the F28335 data sheet, note that the DMA bus does not connect to the SCI modules.

    The 16-deep SCI FIFO is actually quite large.  There are devices with no FIFO which can read 256 bytes without losing any data if the baud rate is slow enough. The FIFO is a 16-deep buffer (buffers up to 16 16-bit words). Which means, when you receive data, it allows you the time to buffer up to 16 words without you reading anything out of the SCIRXBUF register  before it starts losing data.  Likewise, if you write data to the SCITXBUF - Up to 16 words can be stored before you have to wait until the SCI baud rate catches up and sends out all the words and you can buffer up another 16 words.

    On the receive side, you could configure the SCI to interrupt/flag after the FIFO is 8 words deep - when you receive your interrupt, you can read those 8 words - store them wherever you like at that time while the SCI is still receiving data over the SCIRX line at the indicated baud rate (and buffering the data up at the end of the FIFO). Then the next interrupt comes - and you read the next 8 words, all without losing any data.

    The same applies on the transmit side.

    For more information, please see the  TMS320x2833x, 2823x Serial Communications Interface (SCI) Reference Guide (SPRUFZ5)

    Regards,

    Chrissy