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.

BQ40Z50: R_a0x, R_a1x, R_a2x, R_a3x data shown on Battery Management Studio not same as direct read from data flash

Part Number: BQ40Z50
Other Parts Discussed in Thread: BQSTUDIO

Due to certain reason, I need to develop a sw & fw to upgrade GG setting without using EV2300 + Battery Management Studio.

I've develop a sw & fw to update few value in data flash.

The data flash address is referring to BQ40Z50-R4 Technical Reference Manual (the BQ is using R4 firmware).

The following table are the changes needed:

Data flash value

GSI06

GSI07

Settings->Configuration->Balancing Configuration

001b

005f

Advanced Charge Algorithm->Cell Balancing Config->Voltage Cell Balance Window

10mV

25mV

Advanced Charge Algorithm->Cell Balancing Config->Voltage Cell Balance Min

10mV

25mV

Advanced Charge Algorithm->Cell Balancing Config->Voltage Cell Balance Interval

5Sec

20Sec

SBS Configuration->Data->Manufacturer Name

GSI06

GSI07

Gas Gaugingà->IT Cfg->Design Resistance

96

16

Ra Table->R_a0->Cell0 R_a 0

1841

17

Ra Table->R_a1->Cell1 R_a 0

1841

17

Ra Table->R_a2->Cell2 R_a 0

1841

17

Ra Table->R_a3àCell3 R_a 0

1841

17

Ra Table->R_a0x->xCell0 R_a 0

1841

17

Ra Table->R_a1x->xCell1 R_a 0

1841

17

Ra Table->R_a2x->xCell2 R_a 0

1841

17

Ra Table->R_a3x->xCell3 R_a 0

1841

17

After running the sw & fw, I found that all data have been successful updated except xCell0 R_a 0, xCell1 R_a 0, xCell2 R_a 0 and xCell3 R_a 0.

I'm sure that the sw & fw has successful write the value into address 0x41C2 (xCell0 R_a 0), 0x41E2 (xCell1 R_a 0), 0x4202 (xCell2 R_a 0) and 0x4222 (xCell3 R_a 0).

I have another sw & fw which is able to read data flash value from BQ and i found that address 0x41C2 (xCell0 R_a 0) has been updated to 0x11 (17).

During the verification, I found that 0x41C0 (xCell0 R_a flag) also not same with what shown on Battery Management Studio.

I would like to know why the value direct read from data flash is not tally with what shown on Battery Management Studio and is there any solution?

  • Attached gg file before and after update the settings.

    GSI06_Before_Rework.gg.csv

    GSI07_After_Rework.gg.csv

  • Hello Jack,

    I would recommend that you send the same commands through bqStudio Advanced Comm. This is to verify that you get a successful update or not with the commands that you are send.

  • Hi Shirish,

    I've used bqStudio Advanced Comm to read block data from data flash address 0x41C0 and i got same result as what my software read.

    0x41C0 (xCell0 R_a flag) = 0x0555

    0x41C2 (xCell0 R_a 0) = 0x0011


    Whereby bqStudio Data Memory still showing xCell0 R_a flag is 0000 and xCell0 R_a 0 is 1841.

  • Hi Shirish,

    I found something odd.

    Seems like there is something wrong on either R4-TRM or bqStudio.

    Advance Comm SMBus Transaction Log
    
    TimeStamp , Address , Operation , Command , Length , Data , Status , 
    2022-10-06 03:02:27 653 , 16 , Wr Block , 44 , 2 , 40 41  , Success
    2022-10-06 03:02:28 752 , 16 , Rd Block , 44 , 34 , 40 41 55 05 11 00 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7E 00  , Success
    2022-10-06 03:02:35 293 , 16 , Wr Block , 44 , 2 , 60 41  , Success
    2022-10-06 03:02:36 393 , 16 , Rd Block , 44 , 34 , 60 41 00 00 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    2022-10-06 03:02:40 644 , 16 , Wr Block , 44 , 2 , 80 41  , Success
    2022-10-06 03:02:41 501 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:02:43 286 , 16 , Wr Block , 44 , 2 , 80 41  , Success
    2022-10-06 03:02:43 911 , 16 , Rd Block , 44 , 34 , 80 41 55 05 11 00 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7D 00  , Success
    2022-10-06 03:02:58 847 , 16 , Wr Block , 44 , 2 , A0 41  , Success
    2022-10-06 03:03:00 285 , 16 , Rd Block , 44 , 34 , A0 41 00 00 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    2022-10-06 03:03:06 067 , 16 , Wr Block , 44 , 2 , C0 41  , Success
    2022-10-06 03:03:07 159 , 16 , Rd Block , 44 , 34 , C0 41 55 05 11 00 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7E 00  , Success
    2022-10-06 03:03:14 541 , 16 , Wr Block , 44 , 2 , E0 41  , Success
    2022-10-06 03:03:16 033 , 16 , Rd Block , 44 , 34 , E0 41 00 00 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    2022-10-06 03:03:26 113 , 16 , Wr Block , 44 , 2 , 00 42  , Success
    2022-10-06 03:03:27 471 , 16 , Rd Block , 44 , 34 , 00 42 55 05 11 00 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7E 00  , Success
    2022-10-06 03:03:50 357 , 16 , Wr Block , 44 , 2 , 20 42  , Success
    2022-10-06 03:03:51 332 , 16 , Rd Block , 44 , 34 , 20 42 00 00 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    2022-10-06 03:14:30 980 , 16 , Wr Block , 44 , 2 , 40 42  , Success
    2022-10-06 03:14:32 386 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:14:34 566 , 16 , Wr Block , 44 , 2 , 40 42  , Success
    2022-10-06 03:14:35 637 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:14:37 509 , 16 , Wr Block , 44 , 2 , 40 42  , Success
    2022-10-06 03:14:38 906 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:14:40 396 , 16 , Wr Block , 44 , 2 , 40 42  , Success
    2022-10-06 03:14:41 723 , 16 , Rd Block , 44 , 34 , 40 42 00 00 31 07 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7E 00  , Success
    2022-10-06 03:16:50 258 , 16 , Wr Block , 44 , 2 , 60 42  , Success
    2022-10-06 03:16:51 481 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:16:53 207 , 16 , Wr Block , 44 , 2 , 60 42  , Success
    2022-10-06 03:16:54 161 , 16 , Rd Block , 44 , 34 , 60 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    2022-10-06 03:16:59 319 , 16 , Wr Block , 44 , 2 , 80 42  , Success
    2022-10-06 03:17:00 796 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:17:02 446 , 16 , Wr Block , 44 , 2 , 80 42  , Success
    2022-10-06 03:17:03 699 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:17:05 154 , 16 , Wr Block , 44 , 2 , 80 42  , Success
    2022-10-06 03:17:06 427 , 16 , Rd Block , 44 , 34 , 80 42 00 00 31 07 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7E 00  , Success
    2022-10-06 03:17:15 926 , 16 , Wr Block , 44 , 2 , A0 42  , Success
    2022-10-06 03:17:17 799 , 16 , Rd Block , 44 , 34 , A0 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    2022-10-06 03:17:21 636 , 16 , Wr Block , 44 , 2 , C0 42  , Success
    2022-10-06 03:17:23 485 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:17:25 199 , 16 , Wr Block , 44 , 2 , C0 42  , Success
    2022-10-06 03:17:27 481 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:17:29 405 , 16 , Wr Block , 44 , 2 , C0 42  , Success
    2022-10-06 03:17:31 006 , 16 , Rd Block , 44 , 34 , C0 42 00 00 31 07 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7E 00  , Success
    2022-10-06 03:17:38 348 , 16 , Wr Block , 44 , 2 , E0 42  , Success
    2022-10-06 03:17:40 389 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:17:42 005 , 16 , Wr Block , 44 , 2 , E0 42  , Success
    2022-10-06 03:17:43 357 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:17:44 822 , 16 , Wr Block , 44 , 2 , E0 42  , Success
    2022-10-06 03:17:46 098 , 16 , Rd Block , 44 , 34 , E0 42 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    2022-10-06 03:18:14 413 , 16 , Wr Block , 44 , 2 , 00 43  , Success
    2022-10-06 03:18:16 246 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:18:17 896 , 16 , Wr Block , 44 , 2 , 00 43  , Success
    2022-10-06 03:18:18 974 , 16 , Rd Block , 44 , 34 , 00 43 00 00 31 07 12 00 15 00 18 00 13 00 16 00 19 00 18 00 19 00 19 00 1A 00 1F 00 29 00 36 00 7E 00  , Success
    2022-10-06 03:18:27 594 , 16 , Wr Block , 44 , 2 , 20 43  , Success
    2022-10-06 03:18:29 014 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:18:30 518 , 16 , Wr Block , 44 , 2 , 20 43  , Success
    2022-10-06 03:18:31 871 , 16 , Rd Block , 44 , 6 , 54 00 87 01 00 00  , Success
    2022-10-06 03:18:33 423 , 16 , Wr Block , 44 , 2 , 20 43  , Success
    2022-10-06 03:18:34 959 , 16 , Rd Block , 44 , 34 , 20 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  , Success
    

    I attached the Advanced Comm SMB log file.

    Based the DF data,

    0x4140 ~ 0x415F = R_a0 data

    0x4160 ~ 0x417F = dummy/reserved data

    0x4180 ~ 0x419F = R_a1 data

    0x41A0 ~ 0x41BF = dummy/reserved data

    0x41C0 ~ 0x41DF = R_a2 data

    0x41E0 ~ 0x41FF = dummy/reserved data

    0x4200 ~ 0x421F = R_a3 data

    0x4220 ~ 0x423F = dummy/reserved data

    0x4240 ~ 0x425F = R_a0x data

    0x4260 ~ 0x417F = dummy/reserved data

    0x4280 ~ 0x429F = R_a1x data

    0x42A0 ~ 0x42BF = dummy/reserved data

    0x42C0 ~ 0x42DF = R_a2x data

    0x42E0 ~ 0x42FF = dummy/reserved data

    0x4300 ~ 0x431F = R_a3x data

    0x4320 ~ 0x433F = dummy/reserved data

    Please verify whether it's TRM problem or bqStudio problem?

  • Hello Jack,

    I noticed that the before update gg.csv also has 0x0555. How did it get to be that value?

    Also make sure to turn of dashboard refresh before capturing transactions to avoid dashboard interference in the captured data.

  • Hi Shirish,

    I'm sure you are seeing wrongly.

    xCell0 R_a_flag, xCell1 R_a_flag, xCell2 R_a_flag, xCell3 R_a_flag are value 0000 in both before.gg.csv and after.gg.csv file.

    Please take note that this is xCell data, there is an 'x' in front.

  • Hello Jack,

    Sorry for the confusion. I just checked the addresses and it seems to match what you observed.

    Tip: You can get the addresses by choosing Advanced Views in Window-Preferences menu.

  • Can you confirmed that the Technical Reference Manual is wrong?

  • Hello Jack,

    We always recommend using the BQZ to see default values and specific addresses since these can change with the build so they may not match the TRM since there could be multiple builds of the same Rx firmware that causes the addresses to change.

    Sincerely,

    Wyatt Keller

  • Hi Wyatt Keller,

    Do you means that if there is conflict in between bqStudio and TRM, bqStudio is the one to be trust?