Fix feedback divider value approximation

* The rounding algorithm here expects to start with the 2 digits
  after the decimal point in pll->feedbackDivFrac. Multiplying with
  1000 instead of 100 filled it with 3 digits.
  The last step then set the fractional part to zero because it was
  still too large.
This commit is contained in:
Julian Harnath 2014-03-02 16:20:07 +01:00
parent edf1552770
commit 34d3dff3f5

View File

@ -374,7 +374,7 @@ pll_compute(pll_info* pll)
pll->feedbackDiv = pll->minFeedbackDiv;
pll->feedbackDivFrac
= (1000 * pll->feedbackDivFrac) / pll->referenceFreq;
= (100 * pll->feedbackDivFrac) / pll->referenceFreq;
if (pll->feedbackDivFrac >= 5) {
pll->feedbackDivFrac -= 5;