Other Parts Discussed in Thread: BQSTUDIO, BQ34Z100, BQPRODUCTION

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.
i have found the reason where is the actual problem arises.
when i was configuring the parameter it set all ok. but while calibration, reading the old voltage divider value from the data flash memory that i was read is seems very high (28800) i guess for voltage calibration and if i used this value to calibrate voltage by the given formula :
where :
old_volt_dvdr = 28800 (readed value)
read_volt = 60412(readed value)
applied_volt = 57600
formula :
new_volt_dvdr = old_volt_dvdr * (applied_volt/read_volt)
and use the new_volt_dvdr in flash_ok_cell_volt formula
cell_count = 16
old_flash_ok_volt = 2800
flash_ok_cell_volt = old_flash_ok_volt * cell_count * (5000/new_volt_dvdr)
the value of flash_ok_cell_volt reaches to 6700 to 7000 mV. which seems out of range for flash_ok_cell_volt. after this i unable to update new_volt_dvdr value in data flash memory.
Can you help me out in this issue.
Thank You
unable to write any value in voltage divider register, flash_update_ok_voltage, cc_gain, delta_gain.
Tried process :
Can you suggest the process or review my process is it incorrect or need to change any thing else.
thank you.
Hello Diwakar,
Srec package www.ti.com/.../sluc580
The production information is here www.ti.com/.../slua665.pdf
Hi Shirish,
I have followed the same fashion for the calibration that mentioned in document link www.ti.com/.../slua665.pdf. the only difference is i tried to calibrate till fuel gauge return the +/- 50 mV voltage of applied voltage(57600mV). i have attached the code snapshot. still not update
and i used same method for current calibration.
PACK_CURRENT = -5000mA
cc_gain = ((uint32_t)flash_block_data[0])<<24 | ((uint32_t)flash_block_data[1])<<16 | ((uint32_t)flash_block_data[2])<<8 | (uint32_t)flash_block_data[3];
gain_resistence = 4.768 / xemicsToFloat(cc_gain);
cc_gain_delta = ((uint32_t)flash_block_data[4]) << 24 | ((uint32_t)flash_block_data[5]) << 16 | ((uint32_t)flash_block_data[6]) << 8 | (uint32_t)flash_block_data[7];
delta_resistance = (5677445.6/xemicsToFloat(cc_gain));
read_curr = bq_fg_current();
new_gain = (((float)read_curr)/((float)PACK_CURRENT)) * gain_resistence;
Hi Shirish,
Can we do the debug session.
because i am unable to program .srec in my custom board and i am stuck from past 2 weeks to config and calibrate fuel gauge. My project already got delay.
Please suggest me the suitable time for debug session.
Thank You.
Hello Diwakar,
It is very time consuming to debug someone else's code, especially when we do not know details of the system it is running on.
If you need to program the srec, then i recommend that you use bqStudio. This is not required in production because the srec is pre-programmed on the bq34z100-G1.
For production I recommend that you use bqProduction if you have issues with your own code. To debug your code, the best way is to try the same sequence from bqStudio. If bqStudio works and your code does not, then the problem would be in your code. If bqStudio also does not work, then the problem is some setting or hardware/input related.