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.

bq27621-G1 - Accessing Extended Commands

Other Parts Discussed in Thread: BQ27621-G1, BQ27421-G1, BQSTUDIO

Hello,

As outlined in the Quick Start Guide it is recommended that a few parameters be configured to achieve accurate gauging of the target battery (Design Capacity, Design Energy, Terminate Voltage, Taper Rate).  I understand that these parameters are accessed using the Extended Commands, specifically using the DataClass() and DataBlock() commands.  However, in practice I am having difficulty locating the address of the Class I wish to access, and the locations of the parameters within said Class. Inconsistencies exist between the Quick Start Guide and Technical Reference Manual examples, and no full listing of parameter locations are given.

The Quick Start Guide offers an example to use DataClass() to access the "State Subclass" at 0x52.  Where did this address come from?  I find no reference of it anywhere.

Also, the Quick Start Guide continues the example to read and write a new Design Capacity by accessing it within the "State Subclass" DataBlock (offset 0x00) using command 0x4A.  Again, where did this 0x4A come from?  In fact, the example given in the Technical Reference Manual says the Design Capacity can be accessed using the command 0x43. Where did this come from, and which is correct?

I spent an entire day playing around with these addresses and have determined that in some cases, neither document is correct.  My questions therefore is:  Where are the listings of "Class" and "Parameter' address locations for use with the DataClass() and DataBlock() commands?  How do I actually update these values?

Thanks,

Ryan

  • Hello Ryan,

    Those are some very good points you have highlighted about the documentation.  The SBS protocol doesn't seem to have a guide for the Extended Commands.  Some of the TRMs have more details on these commands than others.

    You shouldn't have to look through other TRMs to find what you are looking for.

    Perhaps TI has a complete reference for the Extended SBS commands they can provide a link to and include in the files folder.

    Thanks,

  • Thanks for the support, greenja.

    Could a TI representative please provide the necessary documentation?  The bq27621-g1 Reference manual is clearly missing the necessary data.  Specifically, all the tables in the "Section 6.3 Data Memory Tables" are missing the "Subclass ID" and "Offset" columns.  Should I just assume these are the same as similar parts, such as the bq27421-g1 which includes these columns in it's respective data sheet?

    I think(?) I have managed to figure out where the values I am interested in reside by reading out all the values in the data block and attempting to decode the data myself.  However, I am not getting an ACK when I try to update the Checksum to save the values to memory.  When I re-read the values I attempted to update, they have reverted to their original values.

    Again, it is difficult to determine if I am performing the correct operations since the documentation is not correct, or available.  If you cannot provide the data sheet, can you at least confirm what the correct  checksum value I should be reading on a new device?  The datasheet states I should expect a value of 0x8A, but instead I am receiving 0x33 consistently.  Can someone confirm this is the correct value?  I find it hard to trust that the value provided in the datasheet is correct.

    Thanks,

    Ryan

  • A new version of the bq27621-G1 Technical Reference Manual should appear online by tomorrow that will correct the omission of the Subclass and Offset values for the Data Memory parameters. 


    You can either hard-code the sequence to update these values (by following the flowcharts in the bq27621-G1 Quick Start Guide), or you can use bqStudio with an EVM to update the desired parameters and then generate a gm.fs file which contains a Flashstream script of I2C commands to achieve the same configuration.

  • Thanks! Everything works great now, I had just incorrectly guessed one of the offset values.

    Ryan

  • Glad you got it working, and thanks for the feedback on the documentation.

    By the way, I hope it's not too late to be useful but did you know about our Linux/Android driver sample code you can get to from here?

    https://github.com/aneeshv/bq-docs/blob/master/README.txt

    It's got some examples for many of our single-cell fuel gauges.