soc: arm: nxp: kinetis: ke1xf: determine hw clock cycles/sec from dts
Determine the default CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC from devicetree when using the Arm SysTick hardware timer. When the NXP KE1xF SoC series is using the Arm SysTick as hardware timer, the cycles/second will always be equal to the CPU core clock frequency. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
b563f383df
commit
5fcb13aea3
3 changed files with 8 additions and 2 deletions
|
@ -122,6 +122,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
clock-frequency = <120000000>;
|
||||
};
|
||||
|
||||
&sim {
|
||||
clkout-source = <1>;
|
||||
clkout-divider = <0>;
|
||||
|
|
|
@ -10,7 +10,6 @@ CONFIG_UART_CONSOLE=y
|
|||
CONFIG_UART_INTERRUPT_DRIVEN=y
|
||||
CONFIG_PINMUX=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=120000000
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Kinetis KE1xF series configuration options
|
||||
|
||||
# Copyright (c) 2019 Vestas Wind Systems A/S
|
||||
# Copyright (c) 2019-2021 Vestas Wind Systems A/S
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_SERIES_KINETIS_KE1XF
|
||||
|
@ -8,6 +8,9 @@ if SOC_SERIES_KINETIS_KE1XF
|
|||
config SOC_SERIES
|
||||
default "ke1xf"
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) if CORTEX_M_SYSTICK
|
||||
|
||||
config NUM_IRQS
|
||||
# must be >= the highest interrupt number used
|
||||
default 91
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue