Skip to content

Commit 84373c4

Browse files
VitekSThenrikbrixandersen
authored andcommitted
soc: mimxrt685s/hifi4: Fix HW cycle count
Change hardware cycle count (CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC) to 594 MHz. Move that value to the SoC layer's DT. Validated with the amp_blinky example - the period of the blinking LED is exactly 2 seconds, like was programmed. Signed-off-by: Vit Stanicek <[email protected]>
1 parent 3476212 commit 84373c4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

dts/xtensa/nxp/nxp_rt685_hifi4.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <xtensa/xtensa.dtsi>
77
#include <mem.h>
8+
#include <freq.h>
89
#include <zephyr/dt-bindings/clock/mcux_lpc_syscon_clock.h>
910
#include <zephyr/dt-bindings/input/input-event-codes.h>
1011

@@ -20,6 +21,7 @@
2021
cpu0: cpu@0 {
2122
device_type = "cpu";
2223
compatible = "cdns,tensilica-xtensa-lx6";
24+
clock-frequency = <DT_FREQ_M(594)>;
2325
reg = <0>;
2426
};
2527
};

soc/nxp/imxrt/imxrt6xx/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ endif # SOC_MIMXRT685S_CM33
6969
if SOC_MIMXRT685S_HIFI4
7070

7171
config SYS_CLOCK_HW_CYCLES_PER_SEC
72-
default 198000000
72+
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
7373

7474
config MCUX_CORE_SUFFIX
7575
default "_dsp"

0 commit comments

Comments
 (0)