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.

TMS320F28377S: I2C FIFO capacity

Part Number: TMS320F28377S


Is there a limit on how many bytes can be put into I2CDXR register or read from I2CDRR when the module is used in Non-repeat mode with FIFOs enabled?

From the technical reference manual, the FIFOs are 16 bytes long but I ask this question because the driver library's I2c_putData() and I2C_getData() functions only push out/ receive a single byte from the I2CDXR/I2CDRR register. The functions do not assert or check the number of bytes transmitted.

Is it up to the software to ensure that at most 16 bytes are sent out/ received at a time in FIFO mode? 

What is the expected situation in case more than 16 bytes are sent or received in FIFO mode? In my driver implementation, I am not using FIFO interrupts. I have enabled only the ARDY and SCD general interrupts.

  • Max Number of bytes you can fill TX FIFO in any given point is 16. When FIFO is enabled, using I2c_putData() will start filling up the TX FIFO and using I2C_getData() flushing the RX FIFO.

    Yes, it is upto the software to ensure that at most 16 bytes are sent out/ received at a time in FIFO mode. If you want to continuously transmit data more than I2C TX FIFO depth, keep filling the TX FIFO buffer using DMA.

    Regards,
    Manoj
  • Thanks for your reply.

    I'm also curious about the hardware's behavior in case the software doesn't account for 16 byte long FIFOs. Software cannot set FIFO interrupt levels above 16 bytes, but the I2CCNT register which indicates how many data bytes to transfer or receive, can attain a maximum value of 65535. I don't expect such a high count on this register ever, but how would the module behave in that case, if a very high value was set on I2CCNT?

  • Hi Ruta,

    If using FIFO mode and you set I2CCNT to something greater than 16, you'd have to refill the FIFO buffer to send all the desired bytes. I believe SCL (and SDA too, I think...) would be held low while the FIFO buffer is being re-filled.

    I2CCNT can be used without the FIFO as well, where the buffer size isn't a factor.

    Best,
    Kevin