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.

I2C FIFO size on F28069

Other Parts Discussed in Thread: CONTROLSUITE

Hi all,

I am using F28069 to save data on EEPROM via I2C. I look at the controlSuite example of I2C. It defines a I2C message structure:

// I2C Message Structure
struct I2CMSG {
  Uint16 MsgStatus;             // Word stating what state msg is in:
                                //   I2C_MSGCMD_INACTIVE = do not send msg
                                //   I2C_MSGCMD_BUSY = msg start has been sent,
                                //                     awaiting stop
                                //   I2C_MSGCMD_SEND_WITHSTOP = command to send
                                //       master trans msg complete with a stop bit
                                //   I2C_MSGCMD_SEND_NOSTOP = command to send
                                //       master trans msg without the stop bit
                                //   I2C_MSGCMD_RESTART = command to send a restart
                                //       as a master receiver with a stop bit
  Uint16 SlaveAddress;          // I2C address of slave msg is intended for
  Uint16 NumOfBytes;            // Num of valid bytes in (or to be put in MsgBuffer)
  Uint16 MemoryHighAddr;        // EEPROM address of data associated with msg (high byte)
  Uint16 MemoryLowAddr;         // EEPROM address of data associated with msg (low byte)
  Uint16 MsgBuffer[I2C_MAX_BUFFER_SIZE];    // Array holding msg data - max that
                                            // MAX_BUFFER_SIZE can be is 16 due to
                                            // the FIFO's
};

For the last array size I2c_MAX_BUFFER_SIZE, it says the maximum size could be 16. I am confused about that. I2C FIFO supposed to have 4*16 bit size. If we use two for EEPROM address, then the maximum I2C_MAX_BUFFER_SIZE should be two. Is that correct?

Thanks

Fei

  • Fei,

    This looks like an error in the example. The FIFO size on the F28069 is 4 bytes. We do have devices with 16-byte FIFOs, so I think this was intended to be generic code. I will file a bug report.

    Thanks,