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.

BQ27520-G4: Code example bug provided by Host System Calibration Method SLUA640 document

Part Number: BQ27520-G4

In the document SLUA640 Host System Calibration Method there is a section Floating Point Conversion.

According to chapter 12 Floating Point Conversion there is a flow diagram that explain floating point conversion and there is a code example however there is an if statement is not correct:

} else if (tmpVal < = 1.0) {
  while (tmpVal >= 1.0) {
    tmpVal = tmpVal / 2;
    exp++;
  }
}

Please correct it, make sure flow diagram matches code example. unfortunately I trusted the code example to implement such conversion until I realized that if statement was not matching diagram flow. Therefore time lost.

The fix could save time for other users.

Thanks,