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.

BQ27742-G1: Floating Point Conversion

Part Number: BQ27742-G1

Hi Team,

Good day. Please help to check our customer's concern.

It works normally if using battery management studio but for our customer's convenience they have develop their own software to calibrate it automatically for production purposes.

Now they need to confirm some details on the technical references. The technical reference is sluuax0c ( www.ti.com/.../sluuax0c.pdf ) on page 119

There are 3 points that need to confirm with you if there some corrections need to be done.


1. Does this regulation follows IEEE-754? they found different result if using this algorithm. Only the byte 2 and byte 3 were the same with those of IEEE-754.

2. "Byte 2 OR with 0x80", what's Byte 2 here, is it byte 2? The sign bit is the highest bit, why Byte 2 not Byte 0 ?

3. exp = -128, tmpVal = 2**(8-exp) x mod_val -128 it's more larger than a byte value.

Looking forward to your response. Thank you.

Best regards,

Jonathan

  • Hello Jonathan,

    The technical reference has been used by many without issues. Here are the responses to the points

    1. The floating point format is proprietary. www.ti.com/.../sluuax0c.pdf provides the conversion details.
    2. Correct. Byte 2 is byte2. This is a minor inconsistency in the document.
    3. tmpVal can be large. It gets truncated later when it gets assigned to bytes. This is described in the flowchart ( see LHS* note)

    Hope this helps.

    Regards,