Commit d39d420c authored by Lucien Zhao's avatar Lucien Zhao Committed by Benjamin Cabé
Browse files

boards: nxp: mimxrt700_evk: use ostimer as kernel tick for cm33_cpu0/1



enable ostimer clock
enable os_timer_cpu0/1 for cm33_cpu0/1

Signed-off-by: default avatarLucien Zhao <lucien.zhao@nxp.com>
parent ba982a0f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -400,6 +400,12 @@ void board_early_init_hook(void)
	CLOCK_AttachClk(kSENSE_BASE_to_ADC);
	CLOCK_SetClkDiv(kCLOCK_DivAdcClk, 1U);
#endif

#if (DT_NODE_HAS_STATUS(DT_NODELABEL(os_timer_cpu0), okay) || \
		DT_NODE_HAS_STATUS(DT_NODELABEL(os_timer_cpu1), okay))
	CLOCK_AttachClk(kLPOSC_to_OSTIMER);
	CLOCK_SetClkDiv(kCLOCK_DivOstimerClk, 1U);
#endif
}

static void GlikeyWriteEnable(GLIKEY_Type *base, uint8_t idx)
+2 −0
Original line number Diff line number Diff line
@@ -81,6 +81,8 @@ the hardware features below.
+-----------+------------+-------------------------------------+
| ADC       | on-chip    | adc                                 |
+-----------+------------+-------------------------------------+
| OS_TIMER  | on-chip    | os timer                            |
+-----------+------------+-------------------------------------+

The default configuration can be found in the defconfig file:

+7 −1
Original line number Diff line number Diff line
@@ -65,8 +65,14 @@
	status = "okay";
};

&systick {
/*
 * RT700-EVK board cm33_cpu0 uses OS timer as the kernel timer
 * In case we need to switch to SYSTICK timer, then
 * replace &os_timer with &systick
 */
&os_timer_cpu0 {
	status = "okay";
	wakeup-source;
};

&flexcomm0{
+8 −2
Original line number Diff line number Diff line
/*
 * Copyright 2024 NXP
 * Copyright 2024-2025 NXP
 *
 * SPDX-License-Identifier: Apache-2.0
 */
@@ -56,8 +56,14 @@
	pinctrl-names = "default";
};

&systick {
/*
 * RT700-EVK board cm33_cpu1 uses OS timer as the kernel timer
 * In case we need to switch to SYSTICK timer, then
 * replace &os_timer with &systick
 */
&os_timer_cpu1 {
	status = "okay";
	wakeup-source;
};

&flexcomm19{