zephyr/soc/nordic/nrf54l
Piotr Pryga 37e5b1055e 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: Piotr Pryga <piotr.pryga@nordicsemi.no>
2024-06-25 10:26:11 -04:00
..
CMakeLists.txt
Kconfig
Kconfig.defconfig
Kconfig.defconfig.nrf54l15_enga_cpuapp
Kconfig.defconfig.nrf54l15_enga_cpuflpr
Kconfig.soc
soc.c soc: nrf54l15: Fix HFXO INTCAP code calculation rounding error 2024-06-25 10:26:11 -04:00
soc.h