Other Parts Discussed in Thread: BQSTUDIO
I have a function in my firmware that programs the DF with the factory parameters required for it to work.
This function is called during the system setup.
During normal startup, I read the parameters from the DF and compare them with the factory parameters to allow for normal functioning (battery charging etc.)
The correct configuration of the Mfg Status Init (0x40D7) field in the DF is 0x0003 (ACCHG_EN and ACDSG_EN) set and the corresponding field in the factory parameters object is correctly set. However, when I call the function that programs the factory parameters, all of them are OK except Mfg Status Init, which retains the default value. If I either manually set Mfg Status Init with BqStudio or if I click on the ACCUM_CHG_EN and ACCUM_DSG_EN buttons, then Mfg Status Init contents is 0x0003 and then my firmware finds a match with the factory parameters.
To program the DF, I am unsealing the fuel gauge and setting the calibration mode.
I could not find any mistake in my code, basically I use the same functions that successfully program other fields.
Am I missing something? Does Mfg Status Init require a different handling than other fields (e.g. Design Capacity, Pin Control Cfg)?
Thanks in advance.