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.

TPS65987D: Send data to I2C3 over I2C1

Part Number: TPS65987D
Other Parts Discussed in Thread: TPS55288, BQ27220, LP55231, BQ51221, DRV2605L

Dear Team

Is it possible for a host MCU, to send data/command to I2C3 over I2C1? (Something like sending data/command to SPI via I2C1)

Regards,

Majid

  • Hi,

    Are you expecting this through some kind of register configuration to link I2C1 to I2C3 internally? 

    Regards,

    Peter

  • Dear pdjuandi

    Thanks for the response.

    Any way possible.

    Let me explain it.

    In TPS65987D + TPS55288 configuration, the host MCU (as master) is connected to I2C1 of TPS65987D (as slave),  the TPS55288 (as slave) is connected to I2C3 of TPS65987D (as master). Now to read the 'Status Register (0x7)' of TPS55288, it is only logical to have only one master on I2C3 physical line which is TPS65987D.

    If it is possible to read the 'Status Register (0x7)' of TPS55288 by TPS65987D, and pass the data to the MCU, in any way, it would be great.

    I can think of 4 ways:

    1. The TPS65987D receive a command via I2C1 to read the 'Status Register (0x7)' of TPS55288 via I2C3 and then send back the data via I2C1.

    2. The TPS65987D receive a command via I2C1 to read the 'Status Register (0x7)' of TPS55288 via I2C3 and then store the data internally, and then the MCU read that internally stored data of TPS65987D via I2C1.

    3. The TPS65987D read the 'Status Register (0x7)' of TPS55288 via I2C3, regularly, and send data to the MUC via I2C1, regularly.

    4. The TPS65987D read the 'Status Register (0x7)' of TPS55288 via I2C3, regularly and store it internally, and the MUC read that internally stored data via I2C1 regularly.

    Regards,

    Majid

  • Hi Majid,

    You will need to use 4CC (4 Character Code) I2Cr command as described here.

    Basically MCU sends 4CC "I2Cr" Command over I2C1 of PD Controller -> this command causes PD Controller to send I2C Read Command over I2C3 to TPS55288 -> MCU reads the data read back from I2Cr command in the DATA register.

    To execute a 4CC command, you first need to send the input data to the Data register (0x9 for Data1). After sending the input data to the data register, the 4CC command can be sent to the CMD register (0x8 for CMD1). So in your case the data is the slave address, register address and the # of bytes as described in the table below and the command will be the hex of  ASCII "I2Cr", see attached excel sheet for more detail.

    2072.I2Cr_4CC_cmd_example_987.xlsx

    Regards.

    Peter

  • Dear Peter

    It is not working.

    Using Application Customization Tool, I used the following values to read one byte data from register 0x05 of TPS55288 with I2C3 address of 0x74 (3A << 1), I expected to received the default value of 0xE0 but it is not working:

    Word 1 (Least Significant)                   Word 1 (Least Significant)                4cc Command                          4cc Command

    Data Register (0x9) Before Run          Data Register (0x9) After Run          CMD1 (0x8) Before Run          CMD1 (0x8)  - After Running

    0x74050100                                           0x74050103                                        0x72433249                               0x0

    0x74050101                                           0x74050103                                        0x72433249                               0x0

    0x74050000                                           0x74050003                                        0x72433249                               0x0

    0x74050101                                           0x74050003                                        0x72433249                               0x0

    0x74010005                                           0x74010003                                        0x72433249                               0x0

    0x74010105                                           0x74010103                                        0x72433249                               0x0

    0x01000574                                           0x01000574                                        0x72433249                               0x72433249

    0x00010574                                           *Uninitialized                                       0x72433249                               *Uninitialized

    (* In case of the above line, I have to close/open Application Customization Tool software and recycle the power to my board)

    Q1: Am I setting the values of CMD1 and DATA1 correctly?

    Q2: Does App Configuration Register (0x6c) has anything to do with this?

    The second way:

    The I2Cr command is not working either, and it causes disconnection:

    All of these happening whilst the 'I2C Controller Events' are working perfectly.

    Q3: Is there any settings to allow the I2Cr command to work?

    Regards,

    Majid

  • Hi Majid,

    Is this TPS65987DH or TPS65987DJ, can you send me your pjt file?

    If you are using the GUI debug mode, it needs to be connected.

    Can you read the I2C address when you click on "Sweep I2C address..." from the Adapter menu with Aardvark?

  • Dear pdjuandi

    Q1: Is this TPS65987DH or TPS65987DJ, can you send me your pjt file?

    Answer: it is a TPS65987DDH device.

    Q2: If you are using the GUI debug mode, it needs to be connected.

    Answer: Of course, BEFORE I run the '[I2Cr] - I2C Master Read' command in debug mode to read I2C3 at address 0x74, the Application Customization Tool was connected. AFTER I push the 'Execute I2Cr' button, it disconnects. The same will go for CMD1 & DATA1.

    Q3: Can you read the I2C address when you click on "Sweep I2C address..." from the Adapter menu with Aardvark?

    It is 0x23 (Image bellow)

    My TPS65987D address on I2C1 is 0x46 (0x23 << 1) and the TPS55288 address on I2C3 is 0x74 (0x3A << 1).

    Also in image bellow, I set TPS55288 address in register 0x64 and is working fine.

    Regards,

    Majid

  • Hi Majid,

    I don't see your pjt file, can you confirm you have "I2C3 Enable as Master" checked in register 0x27? If you do can you capture the I2C transactions and make sure you received an ACK for the transactions?

    If you are not reading correctly after having the "I2C3 as master" checked from the GUI debug mode, try using the steps from the above excel sheet.

    1. Write the TPS55288 address and register to DATA1 (0x09)
    2. Write "I2Cr" into the command register (0x08)
    3. Read the command register to verify, make sure it is 0x00
    4. Read the DATA1 register for its content.

    Regards,

    Peter

  • Dear Peter

    In my previous post, I said TPS55288 with address 0x74 is working, it means it has been enabled in register 0x27 (image bellow).

    Why are you repeating the steps, I already did, it is not working.

    Okay, this is my project:

    TPS65987DDH_Source_UFP_Test_1.pjt

    First of all, this project is working, the TPS65987D is SUCCESSFULLY communicating with TPS55288 via I2C3 to initialize it and set its output voltage to 5V, 9V, 15V and 20V as defined in I2C Controller Events.

    I connect a CRO to I2C3's SDA/SCL pins on my custom board and signals waveforms are as expected and clean, so the HARWARE is OKAY.

    Then I tried all steps I posted before, strangely, THERE IS NO SIGNAL on I2C3 pins when I use I2Cr command.

    Then I thought let's do an I2Cw command (Image bellow):

    It says successful but, again, NOTHING BEING SENT via I2C3 pins when I use I2Cw command either.

    DEFIANTLY, something is not right with TPS65987D device's I2Cr and I2Cw commands.

    (I don't have PD analyzer from Total Phase)

    ----------------------------------------------------------------------------------------

    I did another experiment.

    I did the following I2Cw command:

    (Slave Address: 0x0, Length: 0, Data: 0x1)

    Then at I2C3 pins on my CRO, I can see one byte which is 0x00 (image bellow)

    More experiments:

    If I send  (Slave Address: 0x1, Length: 0, Data: 0x1), I will get 0x2 on my CRO (bit 0 is write as 0)

    If I send  (Slave Address: 0x2, Length: 0, Data: 0x1), I will get 0x4 on my CRO (bit 0 is write as 0)

    and so on.

    In these experiments, if I set 'Data' field value to 0x0, then the Application Customization Toll disconnects with no data on CRO.

    In these experiments, the 'Data' field SOULD be 0x1, otherwise I don't see anything on my CRO.

    In these experiments, it seems that the value of 'Length' field could be ANYTHING, it has no effect.

    What is going on?

    All I want is the bellow task to work:

    Regards,

    Majid

  • Hi Majid,

    So when you first power up the board you can see I2C3 transaction to TPS55288, but not when you are using I2Cx command. That's strange.

    Your scope capture is only showing the last transaction so the data might be misleading. If you can capture from the beginning when slave address was written then we can see if it acks the address and so on...

    I suggest we put aside the I2Cw and I2Cr method from GUI for the moment and use the DATA1 and CMD method.

    How do you execute DATA1 and CMD command from your system?

    Can you follow the format in the excel and capture the full transactions? I'm not sure how you execute these commands, so order might be wrong there. Let's try using the following:

    DATA1 (09): 0x01057403

    CMD (0x08): 0x7243324904

    Read back your CMD, make sure it's 0x00 then follows with reading the DATA1.

    Regards,

    Peter

  • When I put 0x01057403 into Data1, the write is successful:

    When I put 0x7243324904 into CMD1, it seems write is successful but, I am getting exception:

    When I close the Exception window, the Application Customization Tool closes too.

    That 0x444d4321 means 'DMC!' or !CMD, and I don't see any signals at I2C3 pins on my CRO.

    I am using Application Customization Tool version 6.1.2, I am not sure what you are using!?

    I am loosing too much time for such a simple task :(((

  • I did another experiment, BUT before I explain that, I should mention that it looks like the I2Cr command is shifting the Slave Address one bit to the left, but the I2C Master Configuration (register 0x64) doesn't. So instead of using 0x74 I will use 0x3a, JUST for the sake of my experiment.

    (Important: In your DATA1 CRO capture you used 0x74 and your CRO shows exactly 0x74)

    If I put 0x0105003a into DATA1 register the write is successful. (I have to use four bytes otherwise, when I run the I2Cr command, Application Customization Tool disconnects)

    If I put 0x72433249 into CMD1 register, I can see on my CRO for I2C3 pins, only the Slave Address with ACK which is 0x74:

    and the value of CMD1 remains 0x72433249.

    When I use my on board MCU to run I2Cr command, I am getting the same result as well.

  • Hi Majid,

    Something is behaving strangely in the setup why the data is shifted and so on.

    Your last capture shows NACK on 0x74, is your slave address a 7 or 8 bit addressing format? Please check.

    I don't have a setup that can connect to I2C3 so I can't verify the transaction on I2C3, if you can please check that as well.

    I have attached here the method I used, let's give a try on your setup.

    I2Cr_4CC_cmd_example_987_majid.xlsx

    Regards,

    Peter

  • Hi Peter

    I've done with this. I suspended the use of TI's TPS65987D and TPS55288 in our recent project.

    I also need this problem to be escalated to the next level. I believe the issue is inside the TPS65987D chip (either a bug in its firmware, setting or simply the I2Cr command syntax is wrong in your documents you sent me) .

    My direct attempt via my MCU (without Application Customization Tool) give me the same result as if I use the Application Customization Tool.

    If this issue is not going to be addressed soon, I will cancel using your chips in my designs.

    P.S.

    I did a lot of design and development to communicate via I2C; successfully, with chips like: LP55231, BQ51221, BQ27220, DRV2605L, etc. and even this TPS65987D communication via I2C is working fine.

    The problem is the TPS65987D can not deliver data to/from its I2C1 from/to I2C3 if I use I2Cr/I2Cw commands, whilst the I2C Controller Events (I2C3 as master enabled) are working fine.

    I look forward to hear you verdict on the subject of this matter.

    Regards,

    Majid

  • Hi Majid,

    I understand the frustration and I will reassign this to the manager (Ghouse).

    We will need to get the full I2C transaction for the team to debug and not just a piece of the transaction, please capture using Saleae logic analyzer/digital scope using the DATA and CMD method and format I have provided.

    We will ensure that we will get to the bottom of this and are here to support you.

    Regards,

    Peter

  • Dear Peter

    I appreciate it. Here the images I captured:

    1. Successful connection from Application Customization Tool version 6.1.2 to my custom board's TPS65987D's I2C1 pins at address 0x23

    2. My TPS65987D's device info

    3. Successful negotiated power delivery

    4. I2C3 enabled as Master

    5. I2C slave address for I2C3 set to my custom board's TPS55288's I2C pins at address 0x74 which is 0x3A << 1

    6. I use 14 indices in my configuration which all are working successfully.

    7. Writing into DATA1 register 0x9, as you instructed in 'I2Cr_4CC_cmd_example_987_majid.xlsx' document

    8. Here it is to confirm the DATA1 has been written successfully

    9. Writing into CMD1 register 0x8, as you instructed in 'I2Cr_4CC_cmd_example_987_majid.xlsx' document

        9.1 Before pushing the 'Execute Write' button

        9.2 After pushing the 'Execute Write' button

        9.3 There is no communication after previous step 9.2

    Notes:

    I. My Oscilloscope has been setup on I2C3 pins of my custom board TPS65987D chip to monitor both SDA & SCL pins.

    II. When writing into DATA1 register 0x9, no signal expected on TPS65987D's I2C3 pins, and there in none on my CRO, which is correct.

    III. After pushing the 'Execute Write' button to write 0x72433249 into CMD1 register 0x8, the clock and data signals are expected on the TPS65987D's I2C3 pins, but unfortunately there are none on either pins, which is the problem. Also, the Application Customization Tool disconnects from my custom board's TPS65987D's I2C1 pins at address 0x23, and I have to recycle the power supply on my custom board to make it works.

    IV. During steps 1 ~ 9, it is obvious that signals are traveling between Application Customization Tool and TPS65987D via I2C1 pins so I didn't provided CRO images.

    V. In your  'I2Cr_4CC_cmd_example_987_majid.xlsx' document, you captured the CRO signals from your TPS65987D's I2C1 pins, which is not helpful, because the problem is on I2C3 pins not I2C1.

    VI. Just for demonstration, the following are the captured images of my CRO, when I unplug the USB-C cable from my custom board, and the TPS65987D send 0x00d2 to register 0x00 and 0x01 of TPS55288, via I2C3 pins, to set the voltage to 5V, which is safe.

         VI.a The Record Index 13 which is call by TPS65987D on Detach Event:

        VI.b The I2C3 signals on my CRO (Sorry about the captured images by phone, my CRO does not has USB, but floppy disk, also the screen aspect ratio is not wide, so I broke it down into two, for readability reason)

    The whole signal:

    The beginning:

    My interpretation of beginning signal:

    The ending:

    My interpretation of ending signal:

    VII. As you can see 4 bytes data; 0x74 (Slave Address), 0x00 (Register Address), 0xD2 (Data to address 0x0), 0x00 (Data to address 0x1), have been sent via I2C3 pins successfully.

    VIII. I searched your e2e forum, and I found the I2Cw command syntax. It has a bit to specify I2C1 (zero) or I2C3 (one); Table 4-44. Is the format of I2Cr in Table 4-37 up to date?

    IX. Without using Application Customization Tool, but only, using the on board MCU on my custom board, I am facing exactly the same problem.

    X. I think the I2Cw command syntax is out of date too. No where in the Table 4-44 has been mentioned the Register Offset's position, to start writing to.

    Conclusion:

    My understanding of the whole issue is that if there is neither a bug in TPS65987D's firmware nor specific settings requirement, the format of I2Cr command (Table 4-37) is not what TPS65987D expects or understand.

    Regards,

    Majid

  • Hi Majid, 

    We are looking into how we can clean up the I2Cw/I2Cr documentation. After Peter's suggestion, were you able to get your issue resolved?

  • How should I resolve the issue? I am run out of time and tired of waiting this long.

    After this long time of waiting, instead of finding the issue with the chip, you're asking me that if I solve the problem? What sort of customer service are you running over there?

    I am considering to dump your chip.

    When you'll get me an answer?

  • Majid,

    Peter duplicated with exact data that you can write and what data you can expect and he also gave spreadsheet (I2Cr_4CC_cmd_example_987_majid.xlsx) of how he was able to use this.

    Can you follow the format in the excel and capture the full transactions? I'm not sure how you execute these commands, so order might be wrong there. Let's try using the following:

    DATA1 (09): 0x01057403

    CMD (0x08): 0x7243324904

    Read back your CMD, make sure it's 0x00 then follows with reading the DATA1.

    I see your message below that you had the I2C3 transactions

    VII. As you can see 4 bytes data; 0x74 (Slave Address), 0x00 (Register Address), 0xD2 (Data to address 0x0), 0x00 (Data to address 0x1), have been sent via I2C3 pins successfully.

    What is your pending issue now?

    And if I may ask what is your application here. I2C3 master use is mainly PD controller to control devices like USB muxes etc for simple I2C writes from I2C master table. It is not meant for tunneling from I2C1 to I2C3. There could be conflicts which can cause issue.

  • Hi,

    It is all about tunneling from I2C1 to I2C3. The title of this question is about tunneling from I2C1 to I2C3 as I asked:

    Question: "Is it possible for a host MCU, to send data/command to I2C3 over I2C1? (Something like sending data/command to SPI via I2C1)"

    And the answer is yes. According to the following highlighted text in yellow:

    Again you are not reading my post completely, just picking something from the context and just repeat and repeat the same answer.

    FOR THE LAST TIME: The communication from MCU or Application Customization Tool via I2C1 IS OKAY. Why you keep capturing signal at I2C1 !?

    The TUNNELING between I2C1 and I2C3 IS NOT WORKING.

    What is the purpose of the I2Cr and I2Cw commands?

    "What is your pending issue now?

    THE PROBLEM IS I2Cr and I2Cw commands, THESE COMMANDS DO NOT DO WHAT THEY SUPPOSE TO DO.

    You said: "And if I may ask what is your application here. I2C3 master use is mainly PD controller to control devices like USB muxes etc for simple I2C writes from I2C master table. It is not meant for tunneling from I2C1 to I2C3. There could be conflicts which can cause issue."

    But highlighted text in the above image says exactly the opposite. It should work. My question is why is not?

  • Majid,

    I am guessing you have looked at this post (+) TPS65987D: Documentation for "I2Cr" - Interface forum - Interface - TI E2E support forums already? In this one you can see that I2Cw command is working correctly, gentleman there had issue with I2Cr command. 

    Do you have a way to capture your I2C3 traffic on a logic Analyzer like Saleae? That might help me to see what issue you are facing or if there is some formatting error.

  • I don't know why we are going in a loop.

    On the post you mentioned, Emma has provided 3 steps.

    The problem is after step 1 which is: "1. You will first write the I2Cr CMD", the TPS65987D becomes non-responsive and I have to reset the TPS65987D (as I mentioned in my previous post; step 9.2). There is no point to do the step 2 which is: "2. Then you will read the CMD register to verify CMD"

    I am sure that gentleman; 'Eriks', just gave up, as I did.

    The bottom line is, the I2Cr is not working on TPS65987D and TI don't want or has no interest to fix it.

  • Majid,

    Your comment maybe right, this particular feature is not documented in public HI TRM for the reason that it is not widely supported. This is not something we can verify on our EVM. However, I was looking to check with some design experts to see if I can find anything further on this. I will keep you posted once I uncover something.