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.

BQ35100EVM-795: BQ35100EVM-795

Part Number: BQ35100EVM-795
Other Parts Discussed in Thread: BQ35100, BQSTUDIO

I played with the Bq35100 and BQstudio.

I have some misunderstanding about type of CC_offset' value and Board offset's unit. I see the data memory calibration page. 

1,

I'd like to know why the CC_offset's value is in floating point data format, why not int16_t,  and the Board_offset's unit why not in mA.  

here is the reference

2,

If I calibrate the chip with BqStudio, will the Bqstudio calculate the CCgain and the CCdelta, and write these values in to the chip in floating point format?  

Is it true?

3,

Why are the unit of CCgain and unit of CCdelta in mOhms?

4, 

If I do calibration with my application MCU, I'd like to know how need to put the calculated 4byte floating point CCgain to the 0x4000-0x4003 memory addresses and CCdelta to the 0x4004-0x4007 adresses. 

What is the byte arrange in the two 4bytes memory array? Where is the exponent, the sign and the mantissa in the memory array?

//----------------------------------------------------------

This is how I would do it in my C program

union{

float f_val;

uint8_t buff[4];

}u;

union u temp; 

float ccgain;

float ccdelta;

extern int8_t boardOffset;

extern int16_t ccOffset;

extern int16_t avgRawCurrent; // I dont know the proper type of this, I only suppose it

extern int16_t current; // I dont know the proper type of this, I only suppose it

// these  two equations came from SLUBH1C.pdf(TRM)

ccgain = (float)current /(avgRawCurrent-(ccOffset + boardOffset) / 16);

ccdelta = ccgain * 1,193,046;

temp.f_val = ccgain;

// this is my I2C blockwrite program

writeExtendedData(0x4000, &temp.buff[0], sizeof (temp.buff));

temp.fval = ccdelta;

writeExtendedData(0x4004, &temp.buff[0], sizeof (temp.buff));

//---------------------------------------------------------------------------------------

Do You think is it can be good for Bq35100 proper operation?

Best regards 

Laszlo

  • Hello Laszlo,

    The TRM explains which values are floating point in the section 3.10 Floating Point Conversion header.

    It is only the CC gain and CC delta that is floating point. BQStudio does all the conversions when using the calibration tab.

    They are defined in mOhms instead of the raw floating point for readability.

    If you follow the floating point conversion defined in the TRM it explains how to write the floating point bytes into memory.

    Sincerely,

    Wyatt Keller

  • Hi Wyatt,

    1,What about the first question?

    2,Why CCgain and CCdelta are in mohm unit? I can read the float value, but I dont understand the unit.

    3, Why is CCoffset's value in float format? CCoffset should be treated as an int16_t type data.

    I would be very happy if I could understand the datas I see on the data memory content page of BQstudio to be consistent with what is written in TRM.

    Thanks

    Laszlo

  • Hello Laszlo,

    I would recommend always referencing the TRM for data formats, BQStudio modifies the values to make them readable to the user and will do different computations to get it in that format. The CC Gain and Delta are set close to the sense resistor, that is why they are in mOhm.

    How BQStudio reports the values are just for readability.

    Sincerely,

    Wyatt Keller