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.

TMS320F28062F: I2C not sending control byte

Part Number: TMS320F28062F
Other Parts Discussed in Thread: CONTROLSUITE, MOTORWARE

I am trying to get EEPROM (24AA08) to work via I2C. The problem I have is that when I send data via I2C (writing to the I2CDXR register), the control byte (the one containing the slave address and r/w bit) is not being sent automatically. However if I send it manually via the I2CDXR register (0xA0), I get the acknowledge signal, and can send as many bytes as I set in the I2CCNT register, and depending on what I wrote to I2CMDR (I2C_I2CMDR_MST_BIT | I2C_I2CMDR_TRX_BIT | I2C_I2CMDR_STT_BIT | I2C_I2CMDR_STP_BIT | I2C_I2CMDR_FREE_BIT), I also get a stop signal at the end. So essentially everything works except that the control byte isn't being sent.

What could cause this behavior? Is there any setting that enables the automatic transmission of the control byte? Because according to the examples in Motorware and ControlSUITE, sending this byte manually shouldn't be required.

  • Please make sure that the FDF bit (bit 3) in I2CMDR is not set. Setting that bit stops the control byte from being sent automatically.

  • Interesting, I am using 24AA128.
    Are you sure it's not being sent? Have you looked on a scope?

    I believe your slave address is 0x50 and not 0xA0.
    Assuming your block select bits in 24AA08 (B0, B1) are 0, then the address to load I2CSAR with is 7 bits = 0x50 (remember, R/W bit is not part of address).
  • The slave address is 0x50, but when I send the control byte, it's 0xA0 for exactly the reasons you described. I wrote in my first post what I was sending to the I2CDXR register, not what I was writing to I2CSAR. And yes, I looked at the scope, that's how I know it's not being sent.

    Furthermore, I noticed that when I try to implement random/sequential read, after configuring the chip for a write operation and writing the 0xA0 control byte and the address, I don't need to send the control byte 0xA1 again when I start the reading operation, because then it is sent automatically. This however does not work when I just start reading at wherever the internal pointer is, only when I was previously writing the address.

    I will however have to look at what Adam Haun suggested when I get back to this.
  • Yep, it was indeed the FDF bit. Thank you.