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.

TMS320F28377D: generate repeated start condition for pmbus i2c

Part Number: TMS320F28377D

I'm trying to talk with a LTC2977 over pmbus / i2c from a 28377D.

In the read byte protocol there's a repeated start condition in the middle of the message between the command code and slave address. Can someone guide me on how to generate a repeated start condition? I can't seem to figure out how to set the I2CMDR register to achieve this.

For the command code transfer in the first part I tried setting I2CMDR = 0x2620 (FREE=1, STT=1, STP=0, MST=1, TRX=1, IRS=1) but it doesn't transmit the command code. It generates a start condition but doesn’t transmit the command code byte.

I also tried I2CMDR = 0x26A0 (FREE=1, STT=1, STP=0, MST=1, TRX=1, RM=1, IRS=1) but get similar result.

If I use I2CMDR = 0x2E20 (FREE=1, STT=1, STP=1, MST=1, TRX=1, IRS=1) it transmits the byte but generates a stop condition after the byte which goes against the 2977 protocol. I need the repeated start without stop.

For the read part of the message I’m using I2CMDR = 0x2C20 (FREE=1, STT=1, STP=1, MST=1, TRX=0, IRS=1) which seems to work well but since I’m not sending the command code part correctly I don’t get any data back from the 2977.

  • If I write to I2CDXR.bit.DATA after setting I2CMDR = 0x26A0 it will send the command byte without the stop. But I had to reset the I2C module via the IRS bit before using I2CMDR = 0x2C20 to do the receive portion of the protocol. It works intermittently. Sometimes it thinks the bus is busy before the receive portion and it doesn't send out the address and clocks for the data.

    In the LTC2977 data sheet it says "When using an I2C controller to communicate with a PMBus part it is important that the controller be able to write a byte of data without generating a stop. This will allow the controller to properly form the repeated start of the PMBus read command by concatenating a start command byte write with an I2C read."

    Is the I2C module on the 28377d capable of doing this?

  • Hi, 

    Will get back to you on this query by tomorrow.

    Best Regards

    Siddharth

  • Siddharth, Any update for me? Thank you.

  • Hi, 

    The repeat mode is relevant if the master is always configured as a transmitter.  In your case , you are sending a command and getting a response to it. 

    Hence these are the steps that you can do

    1. Configure I2C as a master transmitter

    2.  configure it to send the start condition without sending the stop condition

    3. Write the command byte to send to the I2CDXR register

    4. Configure the I2C as a master receiver 

    5. Configure it to send the start condition

    6. Wait for the data to be read 

    7. Then send the stop condition.

    Best Regards

    Siddharth