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: How to control BQ25703 parameters via TPS65987D

Part Number: TPS65987D
Other Parts Discussed in Thread: BQ25703, TPS65987

Hello,

We have TPS65987D and BQ25703 on our board, BQ is connected to TPS's I2C3. TPS65987D is configured so that during boot BQ is initialized to supply 500mA charging current.

We'd like to change charging current on-the-fly. What would be the preferred way to do that? We have host-MCU connected to TPS's I2C1 port.

Can we use 4CC commands I2Cr/I2Cw for that? (Like mentioned here:https://e2e.ti.com/support/interface/f/138/t/903250

Is there documentation available for those commands, how DATAX register should be written for those commands? 

I couldn't find these commands from SLVUBH2B (TPS65987DDH and TPS65988DH Host Interface Technical Reference Manual)

  • Hi Timo,

    I've assigned this issue to the relevant expert who will reach out to you soon

  • Hi Timo,

    Here is an Apps. Note which will guide you in configuring the BQ25703 part.

    Regards,

    Peter

  • Hi Peter,

    We have done BQ initialization according this application note, now initialization is triggered by power on reset -event.

    We need to change dynamically this charging current after boot. It is still a bit unclear how to send I2C commands to BQ after boot (triggered by host MCU connected to TPS65987D I2C1)?

    4CC commands I2Cr/I2Cw shown in configuration tool could be one solution, but how these commands should be used? Many other 4CC commands are described in SLVUBH2B but not I2C related commands.

  • Hi Timo,

    For the I2Cw/r command, you can use them by writing to the BQ slave address, the data length and data.

    The data format is the same as in the I2C Master Event Table or the apps. note.

    Give it a try and see that works for you.

    Regards,

    Peter

  • Hi Peter,

    We tried that, but unfortunately it didn't work - I checked I2C3 bus with oscilloscope and I didn't see any activity. I think there is still some issue with the message format.

    When Configuration tool was used in debug mode, I could send I2Cw/r commands successfully (I saw activity on oscilloscope).

    Regards,

    Timo 

  • Hi Timo,

    Are you saying you can write to the BQ part through I2C3 when you are using I2Cw/r in debug mode but it's not working when not in debug mode?

    Can you clarify what's working and not working?

    What do you set in the I2C Master Configuration (0x64)?

    Is it possible to send your project file?

    Regards,

    Peter

  • Hi Peter,

    Our set up is such that we have MCU connected to TPS65987 I2C1. BQ25703 is connected to TPS I2C3 port. During boot time TPS sends BQ configuration via I2C3, this is working.

    However, we want to change BQ configuration after boot (we'd like to change charging current dynamically) by MCU using 4CC I2Cw command. This scenario is not working - when MCU is writing I2Cw command to TPS, TPS responds by clearing CMD register (0x8) - so we assume that the I2Cw command is accepted. But we don't see any activity on I2C bus when oscilloscope is connected to I2C3 SCL/SDA.

    When Configuration tool is used in debug mode, and I2Cw command is executed, we see activity on I2C3 bus.

    In Master Configuration register (0x64) we have following:

    The whole project file is here:tps_config_270820.pjt

     Thank you for your help

    Regards,

    Timo

  • Hi Timo,

    Can you try using this format from your MCU and see if it works?

    Regards,

    Peter

  • Hi Peter,

    Yes this works, that I2C bus selection was needed.

    Thank you for your help

    Regards,

    Timo