BQ34Z100: Unalbe to calibrate properly

Hi everyone,

I am working on BQ34Z100 for battery pack fuel gauge monitoring. I am having some problem configuring it using the embed_os recommended procedure available here: Setup and Calibration Guide - | Mbed

Following the same instruction but i am not getting the exact results. Can someone please help me find where the problem is?.

Battery pack details: 40Ah, 7 cell in series, 16 in parallel, nominal voltage of each cell is 3.7V, max voltage is 4.2V, min voltage is 2.8V. Capacity of each cell: 2600mAh.

In my case BQ34Z100.h looks like this.
//Definitions
#define GAUGE_ADDRESS 0xAA
//Battery configuration settings
//Stored in flash: run flashSettings() then reset sensor to save
#define DESIGNCAP 2600 //mAh, per cell (Page 48, offset 11)
#define DESIGNENERGY 9620 //mWh, per cell (Page 48, offset 14)
#define CELLCOUNT 0x7//number of series cells (Page 65, offset 7)
#define LEDCONFIG 0x4b //5-LED Expander with I2C host comm (Page 64, offset 4)
#define VOLTSEL true //Switches to an external battery voltage divider
#define ZEROCHARGEVOLT 3200 //mV, charge cut-off voltage/Cell terminate voltages
#define FLASH_UPDATE_OK_VOLT 2800 // mV, below this voltage per cell flash writes will not go through
#define QMAX0 1400 //mAh, datasheet says to use c-rate current
//The voltage divider works by this formula: Gain = (TOP LEG R/BOTTOM LEG R)*1000
//Top leg: 294Kohm and bottom leg: 16.5Kohm
//This only works if you enable the external voltage divider (VOLTSEL) option for the sensor
//Note: requires calibration after setting in flash
#define VOLTAGEGAIN 28816//28816
#define LOADSELECT 0x01 // “Load Select defines the type of power or current model to be used to compute load-compensated capacity in the Impedance Track algorithm”
#define LOADMODE 0x00 // “Load Mode is used to select either the constant current or constant power model for the Impedance Track algorithm”
#define RESETVOLTAGE 22200 //mV, voltage to reset to after unsuccessful voltage calibration
//Sense resistor value
#define SENSE_RES 5.0f //mOhms, value of guage sense resistor
#define USE_EXTERNAL_THERMISTOR 1

If anyone is having idea about what should i first check please let me know.

Thanks.