Skip to content
Commit 91fe22ec authored by Piotr Zięcik's avatar Piotr Zięcik Committed by Anas Nashif
Browse files

kernel: Improve tick <-> ms conversion.



The kernel incorrectly assumed, that system timer frequency is always
divisible without remainder by couple "natural" tick rates (like 100).
As result on some SoCs, time calculations was not correct, producing
strange effects (invalid sleep times, incorrect k_uptime_get() etc.).

This commit enables accurate, but costly (using 64-bit math) tick <-> ms
conversion if the selected tick interval is not exact due to hardware
limitations.

Also, this commit fixes tests in which removed _ms_per_tick were used.

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