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.

bq34z100

Other Parts Discussed in Thread: BQ34Z100, BQ34Z110

Hello,

I am attempting to programatically configure settings on the bq34z100, and am running into a bit of a problem.  I am using the subclass id's and offset values listed in Table 20 of the SLUSAU1A data sheet, in an effort to update the appropriate data flash bytes for Design Capacity, Design Energy, and several other settings.  I found sample code for the MSP430 and the bq27410 and modified it for my purposes (I am running a Cortex-M3 processor and am using the bq34z100) and used SLAA529A as a reference.  I suspect my problem is with the check sum, but I am not sure.  I used the same check sum calculation/update logic found in this sample code, but am wondering if maybe there is a difference between checksum calculation methods for the bq27410 and bq34z100.  Is there any sample code you could send me that shows a flash write and checksum update for the bq34z100? 

 

If not, is there an application engineer I could speak to to get more information?

 

Thanks,

Greg Slavin

  • Hi Greg,

    1. Google bq34z100 and open the top item in the list

    2. Click on "Technical Documents"

    3. Choose "Going to Production with bq34z100"

    4. See page 11 for example code on updating a value and the checksum

    Rgds,

    Doug

  • Hi@All,

    i have the same problem, when i try to write a new value in the EEPRom it does not store in the flash. It worked for the first Time and for writing i have unsealed the bq34z100. But when i try to change the value it doesn't write the new value in the EEProm, only in the buffer. 

    I talk to the I2C interface with a ATMega:

    /* read flash block containing voltage divider, update it,
    * calculate the new checksum and write back to data flash
    */
    bgOneByteWrite(0x61, 0); // enable flash transfer
    bgOneByteWrite(0x3E, 104); // select subclass 104
    bgOneByteWrite(0x3F, 0); // enable general purpose block
    _delay_us(300); // we need to wait here; if we do not, the flash block update fails
    bgIncrementalRead(0x40,data,32); // read 32 byte block
    // the voltage devider is configured by the voltage value that is mapped to 900mV, which is 22815mV for the
    // 20/507-voltage devider
    // data[15] = 26639ul&0xff; // replace voltage divider lsb
    // data[14] = (26639ul>>8)&0xff; // replace voltage divider msb
    data[15] = 22815ul&0xff; // replace voltage divider lsb
    data[14] = (22815ul>>8)&0xff; // replace voltage divider msb
    checksum = 0;
    for(i = 0; i<32;i++) checksum += data[i]; // calculate checksum
    checksum = 255-(0xff&checksum); // invert checksum
    bgOneByteWrite(0x40 + 14, data[14]); // move the updated values to the battery gauge buffer
    bgOneByteWrite(0x40 + 15, data[15]); // move the updated values to the battery gauge buffer
    bgOneByteWrite(0x60,checksum); // write into flash by sending the checksum
    _delay_ms(800); // wait for completion
    
    
    thx and cya Thommy
  • Hello,

    I am working on BQ34z110, I am facing issues with communicatin with it, can you please share the sample code. Thank you