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:
parent
c025e07557
commit
9d815e5251
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ static inline uint64_t z_arm_dwt_freq_get(void)
|
||||||
/* SysTick and DWT both run at CPU frequency,
|
/* SysTick and DWT both run at CPU frequency,
|
||||||
* reflected in the system timer HW cycles/sec.
|
* reflected in the system timer HW cycles/sec.
|
||||||
*/
|
*/
|
||||||
return CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC;
|
return sys_clock_hw_cycles_per_sec();
|
||||||
#else
|
#else
|
||||||
static uint64_t dwt_frequency;
|
static uint64_t dwt_frequency;
|
||||||
uint32_t cyc_start, cyc_end;
|
uint32_t cyc_start, cyc_end;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue