Skip to content

Conversation

@kasjer
Copy link
Contributor

@kasjer kasjer commented Oct 22, 2025

Code was using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC value. System can have non constant value for cycle counter when this constant is not valid.

Now code calls sys_clock_hw_cycles_per_sec() that will expand to CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC (as before) when needed.
It only impacts systems that can change hw cycles per second at runtime (due to calibration or some other clock change).

Code was using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC value.
System can have non constant value for cycle counter when
this constant is not valid.

Now code calls sys_clock_hw_cycles_per_sec() that will expand
to CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC (as before) when needed.
It only impacts systems that can change hw cycles per second
at runtime (due to calibration or some other clock change).

Signed-off-by: Jerzy Kasenberg <[email protected]>
@zephyrbot zephyrbot added area: Kernel size: XS A PR changing only a single line of code area: Tests Issues related to a particular existing or missing test labels Oct 22, 2025
@sonarqubecloud
Copy link

@jhedberg jhedberg merged commit 9aeb7e7 into zephyrproject-rtos:main Oct 24, 2025
27 checks passed
@kasjer kasjer deleted the kasjer/kernel-deadline-test-fix branch October 24, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Kernel area: Tests Issues related to a particular existing or missing test size: XS A PR changing only a single line of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants