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.

Linux/BQ27421-G1: Is SET_CFGUPDATE behavior uniform across parts that provide it?

Part Number: BQ27421-G1
Other Parts Discussed in Thread: BQSTUDIO

Tool/software: Linux


We are adding Data Memory update to the bq27xxx_battery mainline Linux driver,
and must avoid setting one-time programmable (OTP) memory.
Patch: https://github.com/networkimprov/linux/commit/e1d0a76b0c8d3beccff7a76d188f0261734d8d70

The following parts provide set_cfgupdate: BQ27... 421, 425, 426, 441, 621 Docs for 421 & 441 mention OTP memory Docs for 621 do not mention OTP, NVM, or flash Docs for 425 mention re-writable NVM
Docs for 426 mention flash

On the 425, we have found that certain DM fields can never be updated, in or out of config-update,
after a set_cfgupdate/soft_reset sequence, including (subclass,offset) 82,36 and 105,0. What is in OTP on 421 & 441? Is anything in OTP on 621? Is anything in OTP on 425?
Is anything in OTP on 426? Will documented DM ops, e.g. BlockData(), set OTP?
...on which chips?
Is OTP only changed in config-update mode?
...on which chips?

Is all OTP on chip set by the very first set_cfgupdate/soft_reset sequence?
...on which chips?

What is the function of config-update mode if there is no OTP?

What is changed by DM ops when not in config-update mode?
...is that common across the chips?

Why are the DM fields on 425 mentioned above no longer updating?
  • config update mode behaves the same for all ROM IT gauges (421/441/621/425/426).

    Before you can update data memory in ROM IT gauges you have to send the SET_CFGUPDATE command.

    Not all ROM gauges have OTP (there is no user accessible OTP in the 621/425/426/421/441).

    Gauges with user accessible OTP (e.g. bq27411) are supported by bqStudio (this exports a .ot.fs file for OTP programming).

    You cannot change DM when the ROM gauge is not in config update mode.

    See www.ti.com/.../slua801.pdf for examples how to write/read DM.
  • On the 425, why am I unable to update NVM (subclass,offset) 82,36 and 105,0?

    The 425 (definitely) and 426 (likely) have re-writable NVM/flash whereon updates persist across power-cycle.

    Docs for the 421 & 441 say "as shipped from the factory, many bq274x1-G1 parameters in OTP NVM are left in the unprogrammed state". Which parameters? What programs that OTP?

    If not OTP, what exactly is changed by DM update in the 421, 441, 621?

    Are any DM updates persistent across power-cycle in the 421, 441, 621? Have you personally verified this?

    Should DM ops have an effect on any of these parts when not in config-update mode?
  • The 426 doesn't have NVM. References to NVM in the TRM are not correct.

    About OTP: The 421 and 441 do not have user programmable OTP. OTP isn't officially supported for the 421 and 441.
    >What programs that OTP?
    It's programmed at the factory but it's not user programmable.

    >If not OTP, what exactly is changed by DM update in the 421, 441, 621?
    The gauge uses a RAM copy of its configuration. When you select config update mode, the gauge firmware stops the gauging algorithm and allows write access to the RAM which holds the configuration (DM = Data Memory). So if you do a DM update in the 421, 441 or 621 you change the configuration of the gauge and when you exit config update mode, the gauge resumes gauging.

    >Are any DM updates persistent across power-cycle in the 421, 441, 621? Have you personally verified this?

    None of the DM updates are persistent. I verified this on the 421 and 621. The 441 has the same data memory design as the 421 and 621 so it won't keep DM values either when you power cycle/POR.

    The gauge must be in config update mode for DM writes.
  • On BQ27* parts that don't provide config-update mode, e.g. BQ27545, when do DM updates take effect on the part?
  • On flash gauges (e.g. bq2754x), DM updates take effect after successfully writing the check sum.
  • Is there a delay during which a flash (ie non-config-update) gauge resets itself for new DM values?

    For the 545, I see "DF block write typically requires a maximum of 72 ms" but I don't see mention of reset time.