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 can't write data flash

Other Parts Discussed in Thread: BQ34Z100-G1

Dear all, 

I am using BQ34Z100-G1. I can write some of the data flash but not all.

For example, if I want to change Sleep Current in Power subclass, I do the following things.

  1. write 0x00 to 0x61 to enable block data flash control.
  2. Then write 0x44 to DataFlashClass(0x3E) and 0x00 to DataFlashBlock(0x3F).
  3. write 0x0A and 0xF1 (original is 0xF0) to 0x40 and 0x41. OK, it changes.

However, if I want to change FS Wait in Power subclass.

  1. write 0x00 to 0x61 to enable block data flash control.
  2. Then write 0x44 to DataFlashClass(0x3E) and 0x00 to DataFlashBlock(0x3F).
  3. write 0x02 (original is 0x00) to 0x4B.

Nothing changes. 

Can anyone help? Thanks

  • Changing DF data is more complicated than that. You have to read and write the full 32 bytes of data and a checksum. Reference Section 8.3.3.1 Accessing Data Flash in the bq34z100-G1 datasheet for and example. 

  • Thanks for your reply. I may miss something. After writing the correct checksum, there is still nothing changed.

    Here is the step.

    I monitored the I2C and found that the block data was changed after I wrote 0x0A and 0xF1 (original is 0xF0) to 0x40 and 0x41. Then the correct checksum was written. I can see the data changed in EVSW.

    I did the similar thing to FS Wait but the block data remained unchanged after I wrote 0x02 (original is 0x00) to 0x4B. Then the checksum was written. Nothing changed in EVSW.

    Is there anything wrong? Thanks.

  • I think that the problem is that it is a coincidence that you are updating the Sleep Current by writing to 40 and 41. You are supposed to change the data in the block and then write the block of data to command 40. You are not writing to address 40.

  • you are right. I double checked the Reference Section 8.3.3.1 Accessing Data Flash in the bq34z100-G1 datasheet. It works.