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.

BQ76942: Programming a BQ76942 on a custom PCA with BQ76942EVM and BQstudio

Part Number: BQ76942
Other Parts Discussed in Thread: BQSTUDIO, , , BQ34Z100, EV2400

Tool/software:

I'm new to the battery management technology. Using BQstudio and BQ76942EVM, I have been able to set up the GG file and now I want to program a BQ76942 on a custom PCA. This is a 4s2p design. Does the EVM need to be set up as a 4S2P cell simulator and the custom PCA have the batteries installed before I can communicate to the custom PCA BQ76942?

If there is a simpler method to program with the EVM and BQstudio, please let me know. 

THANKS

Bill 

  • Hello Bill,

    Just to double-check, did you mean PCB? If so, you do not need to set up the EVM as a 4S2P cell simulator and have the batteries installed to communicate to the custom board with the BQ76942.

    If you are trying to use bqStudio to program the device, this previous link may assist you: Using EVM to configure for an external AFE IC. If you do not plan on using bqStudio, you can also configure the device with an external MCU. This BQ769x2 Software Development Guide with some Sample Code may also help. 

    Best Regards,
    Alexis

  • Hello Alexi: For PCB, I consider it as just the bare printed circuit board. A PCA I consider as a fully populated printed circuit board. I would like to configure using bqStudio. I followed the guide in the link you provided and I can't get bqStudio to detect the AFE type as it does with the AFE on the EVM. I have checked SCL and SDA signal quality and they look great. I have checked BAT Pin 47 and it's set to 15V. 
    However, the Bat signal behaves as the attached. (dips to 3.3V from 15V every ~3sec) 

    Any ideas as to what I may be missing? 

  • Hello William,

    That is odd to see on the BAT pin. Is this occurring when you just start up your board and the part?
    Can you share an image of your setup? Do you also mind sharing your schematic? If you would like to share it privately, you can ‘Request Friendship’ and directly PM it to me.

    Best Regards,
    Alexis

  • Hello Alexis: Sharing an image of the set up might be confusing. Here is how I have my custom AFE connected to the EVM

    1) SDA and SCL from my PCA are connected to J12 and J15, respectively. 

    2) The MSP430 is powered through USB and the EVM AFE is not powered. 

    Here is an image of the schematic

  • Sorry, I forgot to answer your other question. I haven't put the batteries into my AFE PCA. I used an external power supply to provide the BAT voltage. 

  • Hello William,

    Thanks for sharing your schematic.

    From the schematic:
    1. Is there a reason you have another resistor (R185) after the RC (R119 and C32) for the top cell?

    When you checked SCL and SDA signals, was this from the AFE pins? Do you have a logic analyzer file of this potentially?

    Also, when you say you can’t get bqStudio to detect the AFE type as it does on the EVM, is bqStudio just not autodetecting the device or is it saying something like the ‘selected device could not be found’ as shown below?


    Best Regards,
    Alexis

  • Hello Alexis:

    I'm sure I followed a TI application note for a design with less than 10 cells in series. Let me look! Do you believe this could cause an issue with balancing? 

    I don't have access to a logic analyzer. I can capture signal quality on a scope but would have to decode communicate by hand. 

    bqStudio can auto detect the AFE on the EVM. No issue at all. Works great!

    bqStudio will not auto detect the AFE on my custom PCA. I did get an application response like what you attached in your reply. If I continue with selecting my part number (BQ76942) from the menu and continue, I could be ok? The "proceed at your own risk" is kind of un-nerving and suggests continuing might not be a good idea. What is the real risk to continue? 

  • Hello Alexis. I figured out why the BAT voltage dips every ~3seconds. I was powering up the BAT rail with a DC power supply (no batteries installed). As such, the bq771807 would attempt to blow the fuse. This would pull the current limited DC power supply down. One part of the onion peeled! LOL!

  • Hello Alexis: Using the bq76942EVM, I was able to bqStudio to access my custom AFE. However, it's showing as "Sealed". I've followed the instructions to unseal, but it doesn't work. Here are my memory map settings. I'm using an external DC supply to power BAT. 

  • Hello William,

    If I continue with selecting my part number (BQ76942) from the menu and continue, I could be ok? The "proceed at your own risk" is kind of un-nerving and suggests continuing might not be a good idea. What is the real risk to continue? 

    You should be fine proceeding. 

    I figured out why the BAT voltage dips every ~3seconds. I was powering up the BAT rail with a DC power supply (no batteries installed). As such, the bq771807 would attempt to blow the fuse.

    I'm glad you were able to determine why this was occurring!

    However, it's showing as "Sealed

    I found this previous post that may help: BQ76952: Can't Leave SEALED Mode

    B
    est Regards,
    Alexis

  • Hello Alexis: I have followed the instructions and link you suggested, and I still am unable to get to full access mode. I'm using the unseal and full access keys used in the commands section of bqStudio, which are auto populated. Are these the correct keys? Auto populated are as follows: Unseal as 36720414 and Full access FFFFFFFF

  • Hello Alexis: I tried to use the Command Sequence window in bqStudio. I wasn't able to find a single guidance document in TI's library. Because the unsealing commands must be in sequence before I can unseal and get full access, I wanted to try the command sequence application on bqStudio to make sure these commands were, indeed, in sequence. But when I try to "run' the sequence I get this error. 

    I'm totally puzzled. 

  • Hello Alexis: I noticed in bqStudio the device address is 0xAA. No idea why, I'm using the defaultI2C address of 0x10. On the EVM, it's 0x10. If bqStudio is attempting to use 0xAA, I'm sure that I'm not writing unseal and full access. Although, as you can see, if I try to use 0x10, bqStudio gives me an error. 

  • Hello William,

    This Software Development Guide may assist you in using the command sequence in bqStudio. You will need to write the ‘Bytes to Write (Hex)’ in Little Endian format.

    Are you using the bq34z100 fuel gauge potentially? The device address of 0xAA sounds like bqStudio is picking up a different device unless you OTP'd the BQ76942 to have a different i2c address. 

    Best Regards,
    Alexis

  • Hello Alexis:

    I am using the fuel gauge. I thought about a different device when I was driving this morning. Thanks for you guidance. I will try this evening to get communicating with the right device. 

  • One last question! If bqStudio was attempting to communicate with the fuel gauge, why would bqStudio populate the status register with green and red? Is there a default it follows if communication is not established? 

  • Hello Alexis: The only device on the I2C bus is the bq76942. I have removed all others. Using an external power supply set to 16.8V, I've connected to BAT and Gnd to simulate a battery pack. I have measured every pin on my custom board and compared with the pins on the EVM. The only difference is my custom board LD and PACK pins have a voltage equivalent to BAT.

    I have verified SDA and SCL are present at pins 27 and 26, respectively. Using bqStudio and it still will not communicate.  What conditions would cause the 76942 to ignore any communication? It has to be something simple I'm missing. 

  • Hello William,

    Do you mind sharing an image of your setup? 

    I have verified SDA and SCL are present at pins 27 and 26, respectively. Using bqStudio and it still will not communicate.

    Can you confirm the SDA and SCL are ~3.3V at the EXT I2C (J13) as well? Does bqStudio show the same error as before or something else? Do you also mind checking REG18's voltage? It should be 1.8V when the device is ON.

    Also I noticed a thermistor is connected to TS2 on your custom board schematic. TS2 by default is used as a WAKE pin unless configured otherwise. This could be potentially causing the part to go into Soft Shutdown Mode which is explained more in this Soft Shutdown FAQ

    Best Regards,
    Alexis

  • Hello Alexis:

    1) SDA and SCL are operating at 3.3V and the signal quality is good. 

    2) Reg18 is operating at 1.7V and is stable. If the 769842 is in sleep mode, is Reg18 shut off?

    3) bqStudio behavior is different once I took the fuel gauge off the I2C bus. Now all of the registers are greyed out. Plus, the bqStudio application will stop and the window will disappear. 

    4) I currently have TS2 set up as thermistor with a 10K Ohm to gnd. Let me look into the setting. 

    Thanks

    Bill 

  • Hello Alexis: The saga continues. 

    1) I remeasured Reg18 and it's actually at 1.45V. It's not loaded by anything else other than internal. Odd!

    2) I noticed when bqStudio was initializing, the left side icon dashboard for a brief time showed bq76942 for the IC icon followed by FFF_9_99 and address 0xAA.The fuel gauge is no longer connected. bgStudio registers are still grayed out. 

    3) Removing the TS2 resistor made no difference. 

    4) I'm running out of things to try to get this part to communicate. 

  • Hello Alexis. I just noticed the part that is loaded on my custom board is bq7694202. As such, Reg1 is supposed to be 3.3V and I measured it and it's 0V. 

  • Hello William,

    I noticed when bqStudio was initializing, the left side icon dashboard for a brief time showed bq76942 for the IC icon followed by FFF_9_99 and address 0xAA.The fuel gauge is no longer connected. bgStudio registers are still grayed out. 

    Did you restart bqStudio to see if it was able to detect the BQ76942 once the fuel gauge was removed? Or are you saying this still occurred with the fuel gauge connected as well?

    Also, I found this previous post that may help: https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1130723/bqstudio-unable-to-communicate-with-second-i2c-device-on-bus-due-to-autodetection-overwriting-i2c-address-selection-in-bq-studio-bq34z100-g1-bq76952-on-same-bus

    If that post doesn't help, do you mind doing an A-B-A swap? 

    Best Regards,
    Alexis

  • Hello Alexis:

    I restarted bqStudio several times after removing the fuel gauge and the address is 0xAA. Because the part is a bq7694202 and this version Reg1 is configured to provide 3.3V. As I mentioned, Reg1 is 0V. 

    Let me read through the link you provided to see if it can offer some additional insight. 

    I was thinking of ordering a few more bq76942 ICs and swapping out the one on my custom PCA. Quick question, are the parts sealed from the factory? 

  • Hello William,

    Thanks for clarifying. That is strange that the REG1 is 0V. Assuming you did not turn off the preregulator, it should be outputting 3.3V. 

    Quick question, are the parts sealed from the factory

    They should not be SEALED initially; however, I will double-check and get back to you regarding this. 

    Best Regards,
    Alexis

  • Hello Alexis: I tried the suggestion in the link you sent and it still doesn't work. You mentioned about shutting off the pre-regulator. I didn't intend to shut it off. The with the exception of Reg18, Reg1, Reg2, RegIn and Breg are 0V.  

  • Hello,

    Our engineers are out of office and will get back to you next week.

    Best Regards,

    Luis Hernandez Salomon

  • Hello Alexis: I read the bq76942 will default to 400kHz I2C until the OTP has been programmed to something different. Below is a SCL and SDA cope trace from the ba76942EVM I2C interface. As you can see, it has a 100kHz clock. This likely can explain why I can't communicate to my monitor IC.

    Can I change the EVM clock on the MSP430 to be 400kHz? 

  • Hello Alexis: Any comments?

  • Hello Alexis: I'm still having an issue with communicating to the bq76942 on my custom PCA using bqStudio. I have tried several of the TI's suggestions and still get address 0xAA. BQ76942 is the only part on the bus. 

    I am able to communicate to 76942 using an Arduino Nano, so I know the IC isn't damaged. I have tried everything and bqStudio just will not cooperate. Any other ideas?

  • Hi William,

    I need some context here. Is the device you are using SPI or I2C based?

    The device address for BQ76942 is set by default to 0x10



    You can manually change the address in bqStudio. 
    For this, unplug EV2400. Open bqStudio. You will see the below window. Manually open the BQ76942 target file and change the device address. 


    If the above does not work. Navigate to Advanced Comms tab window and manually change the device address. And try reading from this same window.

  • Hello Jose: Thank you for your reply. For me to get bqStudio to actually recognize address 0x10 on I2C, I had to make sure the monitor IC bq76942 was the ONLY device on the I2C interface. bqStudio is very unforgiving!

    Are you saying if I have other devices on the I2C bus I can FORCE the address to be 0x10?  On the advanced comm tab, I tried that approach, and it didn't work. 

  • Hello,

    I am glad you at least have it working for when BQ76941 is connected by itself.

    You can run two devices in parallel as long as you have two EV2400s and open two different bqStudio instances. 
    Make sure to first connect the bq76942 that was giving issues initially. Then, connect other devices. 

  • Hello Jose:

    One quick question, if I remove the 76942 from the EVM and connect I2C to my custom PCA, why would bqStudio not launch? Is studio expecting something provided by the monitor IC? 

  • Hello,

    bqStudio probably does not lunch because it does not automatically detect the device. 
    Have you tried reading manually from advanced comms? 

    I would place a bus sniffer and check and bqStudio is actually trying to read. 

  • Hello Jose: I did check and bqStudio is sending out I2C signals. I'm not able to use advance comms. bqstudio doesn't fully launch the application to where I have access to the comms. 

  • Hello William,

    You actually do not need bqStudio to automatically completely launch in order to talk to the device.

    Force open a BQZ file with I2C protocol, and turn off all auto-scanning features and navigate to Advanced Comms

    Try reading manually from correct device address.