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.

BQ28Z610 - Writing to Flash

Other Parts Discussed in Thread: BQSTUDIO, EV2400, BQ28Z610

Hi TI Community,

I have BQ28Z610EVM eval board. I would like to change default parameters saved in flash memory. For example CellOverVolt_StdTemp (0x46BA) or DesignCapacity_mAh (0x462A). I'm using STM32F4 board to communicate with eval. I've prepared functions which provide reading and writing to memory via I2C interface (according to section 12.2.46 in SLUUA65A document). Reading works quite well, but I have a problem with writing. New value is ignored. I tried to wait after writing, but it doesn't change anything.
I don't now why, but device came to me in UNSEALED mode (I've read [SEC1][SEC0] flags in AltManufacturerAccess() 0x0054 OperationStatus register). Is it wrong? In SLUUA65A is written: "In UNSEALED mode, all data, standard and extended registers and DF have read/write access" and "UNSEALED to FULL ACCESS instructs the device to allow full access to all standard and extended registers and data flash. The device is shipped from TI in this mode." Is there any difference between these modes? Do I have to change mode to Full Access? If so, what is default security key to do it?

Thank You

Maciej Jeleń

  • Hello Maciej,

    Typically the default Unsealed to Full Access key is 0xFFFF & 0XFFFF (MSB and LSB). Please try sending this key to see if the gauge goes into Full Access mode and try writing to the DF again.

    Thanks.
  • Hello Fernando,

    Unfortunately it didn't help. I've sent 0xFFFF 0xFFFF to AltManufacturerAccess but it didn't change anything.
    Is there any block diagram of correct I2C transmission (such as i.stack.imgur.com/IXjer.png) for Standard Commands, AltManufacturerAccess Commands and DataFlash? I would like to compare my transmission (using logic analyzer). Maybe there is a problem.


    Thank You
    Maciej Jelen
  • Marciej,
    pls send a screen shot of the register window of bqstudio.

    thanks
    Onyx
  • Hello,

    I don't have EV2300/EV2400. If I had EV, I would connect oscilloscope or logic analyzer. Like I said, reading works well (I think). Today I will read status registers and paste here.

    Thank You
    Maciej Jeleń
  • HI Maciej
    The device ships out of TI in full access mode. What are the states of Sec1 and sec 0?

    For evaluation purposes i would highly recommend you get an ev2300 or ev2400. It will help a lot.

    thanks
    Onyx
  • hi Maciej,

    It appears there is an error in the TRM.

    When the device is sealed, sec 1 and sec 0 are both set. When the device is in unsealed sec 1 is set and sec 0 is clear. When the device is in full access, sec 1 is clear and sec 0 is set. The TRM has the bit order swapped for unsealed and full access.

    thanks

    Onyx

  • Hello Onyx,

    So device is in Full Access mode. I'm glad to hear that. I read some of status registers:

    Macufacturer status (0x00/0x01):   0x204
    Battery status (0x0A/0x0B):   0xD0
    Operation status (AltManuf.Acc 0x0054):   0x6D80 -> 0b0110 1101 1000 0000
    Charging status (AltManuf.Acc 0x0055):   0x8
    Gauging status (AltManuf.Acc 0x0056):   0x455
    Manufacturing status (AltManuf.Acc 0x0057):   0x0
    DA Config (Data Flash 0x469B):   0x3C

    Could You check my low-level functions?

    Single read (I2C commands) i.e. reading voltage from Standard registers:



    Single write/read (I2C commands) i.e. writing/reading AtRate -2000mA (Standard registers):


    MAC command (i.e. FET Control 0x0022):


    MAC read (i.e. chemID 0x0006):

    Data Flash register write (design capacity 0x462A  1800mAh):




    Thank You
    Maciej Jeleń

  • Hi,

    I solved my problem. I bought EV2300 and changed default values on eval via bqStudio. Unfortunately I have another :/
    New bq28z610 soldered on custom board doesn't boot up when I connect external voltage (like button on eval). I can not read any status registers, values etc. (bq28z610 is not visible in bqStudio)  BUT I can write firmware by firmware update tab. After that bq28z610 starts and works quite well until I disconnect it from the battery.

    Thank You
    Maciej Jeleń

    PS. Thanks for technical reference update (sluua65b)

  • Maciej
    Onyx is out of the office. I noticed that he was discussing sealed mode. The device will reseal, if the battery voltage is interrupted. You should still be able to communicate with the device when it is sealed. Can you still load firmware after reconnecting the battery.

    Tom
  • Hi Thomas,

    To be precise: bq28z610 that I am working on is on custom PCB. Is new and in full access mode -> SEC1 = 0, SEC0 =1 (there was a error in reference manual that we found).
    I have no problem with eval. I can disconnect battery, connect it, press button and it works (turns on discharge and charge FET and hold them on) - I can communicate with the device. I have another board (schematic is the same as eval, without bq294502drvr) with bq28z610. I prepaired firmware on eval (DA config set to 1 cell and another calibrations - voltage, currents...) I saved this firmware on disc (in .srec file) and upload it to bq28z610 on custom board. After that, device is running but when I plug out battery and connect again (and manually apply voltage to the PACK pin -> connect BAT+ to PACK+) device will not boot up again. I can not read parameters (bqStudio shows error "no acknowledge from device"). To boot up device I have to open firmware tab, select .srec file and upload it again. After upload bq28z610 turns on.

    Thank You
    Maciej Jeleń
  • Hi,

    More details.
    Default eval firmware version is v17. Firmware on new shipped ICs is v16.

    v16:

    • Has incorrect default protections values (i.e. CUV threshold = 24647 mV, recovery = 4608 mV
    • I can not change this values because bqStudio has not proper plugin (register map) for v16 software - only for v11 and v17

    v17:

    • It has good default parameters - I can change it from bqStudio via EV2300.
    • It works only with chip shipped with eval.
    • When I upload this version to new chip, IC doesn't start after "shutdown" command or when I disconnect the battery and reconnect it (and apply voltage on PACK pin of course)

    I tried to change IC on eval to new but the problem is the same. New IC behaves exactly the same (won't start).

    My situation is very similar to discussed in this thread: e2e.ti.com/.../517017

    Where can I get plugin for bqStudio which allows me to work with v16 or how to solve problem with booting up bq28z610?

    Any other proposals?

    Thank You
    Maciej Jeleń

  • the default full access key is 0xffff 0xffff
    thanks
    Onyx
  • hi Maciej,

    The device comes preprogrammed with version 17 firmware. You should be able to boot up the device following the instructions in the user guide of the device. Configure the EVM for 2-series battery and you should be able to access the device.

    thanks
    Onyx
  • Hi Onyx,

    I think this problem is solved. There was a faulty series of ICs, marked "6156". That chips comes with firmware v16 and wrong prameters.


    We bought 10 new BQs (marked "614F"). They have v17 firmware and behave exactly like eval (marked "59SK").
    Another series (3 pcs) marked "648P" works well too.
    Eval and ICs have been shipped from Mouser.

    Is there any chance to get .bqz file for v16 firmware (plugin for bqStudio) on TI website? I need this plugin to change parameters on bad chips without changing firmare. I tried to upload v17 firmware but BQs don't boot up after power reset (I described this in previous posts). They starts only with original (v16) software.


    Thank You
    Maciej Jeleń

  • Hi Maciej,

    glad to hear the problem is fixed. There was a hardware revision of the IC. The new hardware will work with both version 16 and version 17 but the old hardware will only work with version 16. That is why when you loaded v17, the device didn't boot up after POR. I would recommned replacing that IC with a new hardware IC.

    Attached is instructions to be able to tell if you have the old hardware or the new hardware on an IC. Also attached is the bqz for v16.

    how to identify hardware version.docx

    2610_0_16-bq28z610.bqz

    thanks

    Onyx

  • Hi,

    is it somehow possible do identify which hardware version i will get, when i request bq28z610 samples from the TI webpage or order them from an online store?

    Or is it only possible to check them if they are already here.

    Thank you

    Fabian Jaenicke

  • Hi Fabien,
    If ordered from the TI webpage, you will get the latest hardware version which is the A2 version. That is only what we are currently shipping.

    thanks
    Onyx