Skip to content
Commit 37e5b105 authored by Piotr Pryga's avatar Piotr Pryga Committed by Anas Nashif
Browse files

soc: nrf54l15: Fix HFXO INTCAP code calculation rounding error



The implementation of formula, to calculate HFXO INTCAP code,
had a rounding error. That may lead so small deviation of HFXO
clock accuracy.

The IPS formula uses capacitance values in piko Fartd units.
That requires use of floating point data types. To avoid that
implementation of the formula uses femto Farats (1000 smaller unit).

In the former implementation conversion from femto Farad to piko Farad
was done just after reading of the desired capacitance from DTS.

To make sure the calculations are correct the change of unit must be
done at very end. Also rounding must be applied.

Also the formula was split and more comments were added to make the
implementation clear.

The commit fixes the implementation of the IPS formula.

Signed-off-by: default avatarPiotr Pryga <piotr.pryga@nordicsemi.no>
parent f0f5f28f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment