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-g1 write checksum error

Other Parts Discussed in Thread: BQ34Z100-G1

Hello, 

I am using bq34z100-g1 with firmware version 0x0016 and hardware version 0x0080.

I am using 2 cell battery so I want to disable internal voltage divider. I am following procedure given in datasheet. But whenever I write new checksum into device it is giving me error.

I donot have evm right now. Can you please help?

Thanks

Hemant

  • i am using following formula from datasheet
    A quick way to calculate the new checksum is to make use of the old checksum:
    (a) temp = mod ((255 – OLD_checksum – old_Pack_Configuration_MSB), 256)
    (b) NEW_checksum = 255 – mod ((temp + new_Pack_Configuration_MSB), 256)
  • Also,
    Right now status word shows ic is in sleep mode. How to come out of sleep mode?
    IC is not measuring current in sleep mode
    That is how to make transition from sleep mode to normal mode?
  • The device exits sleep mode when the current increased. The gauge does measure current when in sleep mode, but it does so every 20s instead of every 1s. You can disable sleep mode by setting the Sleep bit to 0 in the Pack Configuration register.

  • Try this using the Windows calculator in Programmer mode.

    • Select Hex and Dword
    • Enter the original checksum
    • Press the Not button.
    • Subtract the original byte of data that was changed. e.g. 14
    • Add the new byte of data that was entered. e.g. 04
    • Press the Not button
    • Use the last byte as the new checksum.
  • Thanks Thomas,
    Answers using windows calculator and using procedure given in datasheet are same.
    I have below questions,
    I want to disable internal voltage divider
    i.e. set [VOLTSEL] bit in pack configuration register.
    For this I am following below procedure given in datasheet,
    method 1:
    1. (wr 0x00 0x14 0x04)
    2. (wr 0x00 0x72 0x36)
    3. (wr 0x61 0x00)
    4. (wr 0x3E 0x40)
    5. (wr 0x3F 0x00)
    6. (rd 0x40 old_Pack_Configuration_MSB)
    7. (rd 0x60 OLD_checksum)
    8. new_Pack_Configuration_MSB = old_Pack_Configuration_MSB | 0x08;
    9. (wr 0x40 new_Pack_Configuration_MSB)
    10. (wr 0x60 NEW_checksum)
    11. (wr 0x00 0x41 0x00)
    12. (wr 0x00 0x20 0x00)
    But this code gives error in I2C write at step number 10.
    (The above steps are as per given in datasheet)

    Now, if I just change
    method 2:
    6. (rd 0x41 old_Pack_Configuration_MSB)
    9. (wr 0x41 new_Pack_Configuration_MSB)
    Then IC accepts this new checksum.
    Why? Which is correct method 1 or 2.
    Also
    As per datasheet pack configuration register is 16 bit.
    Its lower 8 bits are stored at 0x40 and upper 8 bits are stored at 0x41. Am I correct??

    Thanks in advance!!!
  • Thanks Thomas for reply,
    So if I want to disable sleep mode, then I am following below steps.

    1. (wr 0x00 0x14 0x04)
    2. (wr 0x00 0x72 0x36)
    3. (wr 0x61 0x00)
    4. (wr 0x3E 0x40)
    5. (wr 0x3F 0x00)
    6. (rd 0x40 old_Pack_Configuration_LSB)
    7. (rd 0x60 OLD_checksum)
    8. new_Pack_Configuration_LSB = old_Pack_Configuration_MSB & 0xBF;
    9. (wr 0x40 new_Pack_Configuration_LSB)
    10. (wr 0x60 NEW_checksum)
    11. (wr 0x00 0x41 0x00)
    12. (wr 0x00 0x20 0x00)
    But this code gives error in I2C write at step number 10.
    Why?
    Am I correctly following all addresses?