timing: use runtime cycles for cortex-m systick

Use sys_clock_hw_cycles_per_sec() instead of
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC to determine clock cycles.

Signed-off-by: Michel Haber <michel-haber@hotmail.com>
This commit is contained in:
Michel Haber 2021-11-09 17:34:35 +01:00 committed by Carles Cufí
commit 9d815e5251

View file

@ -40,7 +40,7 @@ static inline uint64_t z_arm_dwt_freq_get(void)
/* SysTick and DWT both run at CPU frequency,
* reflected in the system timer HW cycles/sec.
*/
return CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
return sys_clock_hw_cycles_per_sec();
#else
static uint64_t dwt_frequency;
uint32_t cyc_start, cyc_end;