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.

bq78350 - Avaliable SMBus Commands in SEALED Mode

Other Parts Discussed in Thread: BQ78350, BQSTUDIO

Hey guys I'm pulling data from the following registers when the BQ78350 is in Unsealed mode. 

As soon as I sealed the chip which I did by accident I saw that the registers below stopped returning the correct data. I then used the BQ Software to unseal the device and the register reads started coming back correct again. 

0x2B  -  FET Status : 1111111111111111
0x16 -  Battery Status Flags: 1111111111111111
0x50 -  Safety Alerts: 11111111111111111111111111111111
0x51 -  Safety Status: 11111111111111111111111111111111
0x54 -  Operating Status: 11111111111111111111111111111111
0x55 -  Charging Status: 11111111
0x52 -  Permanent Failure Alert: 1111111111111111
0x53 -  Permanent Failure Status: 1111111111111111

How do I access this data while the BQ78350 has been switched over to Sealed mode? 

Do I have to add x00 to the read code so it request to read from 0x002B, x0016, x0050.........

  • Certain SBS commands are blocked when sealed from the SBS implementation, (see the TRM sluuan7a section 16.2.30). Some blocked data is still available through manufacturer access (MAC) commands when sealed. See the TRM section 16.44 and following. See table 16-2 for a MAC command summary which includes a column showing what is not available in sealed mode.
    The commands are defined as words, it would be best to send both bytes. bqStudio seems to fill in the leading zeros
  • Hey Willy I think I found the cause of my issue after looking over the TI Support Forum at some other suggestions.

    Instead of using 0x44 as suggested in the TRM for the BQ78350 I tried using the 0x00 Mac address and now I'm I'm getting what looks like a proper return. Can you help me clarify please.

    The TRM says this:

    Now I'm trying to read these registers with the BQ78350 in sealed mode:

    Using the following Write > Read process did not work when trying to access the 0x0050 SafetyAlert data in Sealed mode:

    Now when I change the 0x44 to 0x00 I get what I think is the right return on the Read part, see below:

    So it looks like the on the Read part the fuel gauge is returning 0x02 which is the expected number of bytes it is sending back, and then 0x50 which is the register its returning from? 

    Is that correct? 

    What is the 0x44 all about and should it ever be used? 

  • Protocol level tools including bqStuido make things simpler but a problem is they hide details.  The hidden details can make it harder to implement similar techniques with a MCU for example.  The bq78350 communication is layered, the part protocol described in the TRM is based on SBS Data specification which is built on SMBus communication.

    The TRM text you included above does not make it clear, but the traditional approach from SBS data would be to write the MAC command 00 word, then read back block data with command 0x23. The response address options are shown in the table column heading rather than the text, both 0x23 and 0x44 are supported.

    I don't know the history, but manufacturer block access at address 44 was added to gauges to allow write and read at the same address using the block protocol.  As the table heading indicates, data should be available at 0x23 or 0x44.  The following command/responses should work for the parameters you note or any of the block data MAC commands:

    Write MAC command (0x00) and word with word protocol, read data at command 0x23 in block format.

    Write MAC command (0x00) and word with word protocol, read data at command 0x44 in block format.

    Write MAC command 0x00 and word with block protocol at command 0x44, read data at command 0x44 in block format.

    Write MAC command 0x00 word with block protocol at command 0x44, read data at command 0x23.  This one seems odd.

    If you are working with a SBS command which returns block data, you would send the SMS command rather than the MAC command + word, but after the gauge is sealed the information you are asking are from MAC command words.

    The bqStudio tool, like (some) other gas gauge tools will use PEC if the address is selected as 17, it will not use PEC if the address is sent as 16.  The address on the bus is 0x16 for write, 0x17 for read.  These are used regardless of the address selected in the tool window, the address in the tool window just switches the mode of the tool to send and check the extra data or clocks for data.  The tool hides the extra protocol, but you can see it with a scope or I presume a protocol analyzer.  This could be useful for comparison.  This is a tool feature and I presume documented somewhere for the tool, it is not in the TRM since it is a tool feature.

    The read consists of a write command followed by the read command (in addition to the earlier command written to set the 'data pointer'), so I'm not sure what your protocol description examples above are showing, I dont' think they are correct data.  You might look at the document attached to the post http://e2e.ti.com/support/power_management/battery_management/f/180/p/306905/1070385#1070385 (or at several other posts) "SMBus made simple V6.pdf", a direct link if it works: /cfs-file/__key/communityserver-discussions-components-files/196/7367.SMBus-made-simple-v6.pdf  The document has links at the end to get to the SBS specificaiton and SMBus specificaiton at the end if needed.

  • Thank you very much for taking the time to respond with detailed info. 

    I figured it out after about 7 hours of trying a tons of different read and write command structures. Very frustrating. 

    Here is what ended up working for me. 

    Here is what the code structure looks like when using the Wire library on Arduino:

    I'm sure this will help somebody out in the future. 

    Thanks again Willy!