diff --git a/boards/nxp/frdm_mcxn947/board.c b/boards/nxp/frdm_mcxn947/board.c index 484858f02dd..e874eddcb82 100644 --- a/boards/nxp/frdm_mcxn947/board.c +++ b/boards/nxp/frdm_mcxn947/board.c @@ -166,6 +166,31 @@ static int frdm_mcxn947_init(void) CLOCK_SetClkDiv(kCLOCK_DivWdt0Clk, 1u); #endif +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer0), okay) + CLOCK_SetClkDiv(kCLOCK_DivCtimer0Clk, 1U); + CLOCK_AttachClk(kPLL0_to_CTIMER0); +#endif + +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer1), okay) + CLOCK_SetClkDiv(kCLOCK_DivCtimer1Clk, 1U); + CLOCK_AttachClk(kPLL0_to_CTIMER1); +#endif + +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer2), okay) + CLOCK_SetClkDiv(kCLOCK_DivCtimer2Clk, 1U); + CLOCK_AttachClk(kPLL0_to_CTIMER2); +#endif + +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer3), okay) + CLOCK_SetClkDiv(kCLOCK_DivCtimer3Clk, 1U); + CLOCK_AttachClk(kPLL0_to_CTIMER3); +#endif + +#if DT_NODE_HAS_STATUS(DT_NODELABEL(ctimer4), okay) + CLOCK_SetClkDiv(kCLOCK_DivCtimer4Clk, 1U); + CLOCK_AttachClk(kPLL0_to_CTIMER4); +#endif + /* Set SystemCoreClock variable. */ SystemCoreClock = CLOCK_INIT_CORE_CLOCK; diff --git a/boards/nxp/frdm_mcxn947/doc/index.rst b/boards/nxp/frdm_mcxn947/doc/index.rst index cdf14c1abbd..cf63ab6abff 100644 --- a/boards/nxp/frdm_mcxn947/doc/index.rst +++ b/boards/nxp/frdm_mcxn947/doc/index.rst @@ -80,6 +80,8 @@ The FRDM-MCXN947 board configuration supports the following hardware features: +-----------+------------+-------------------------------------+ | PWM | on-chip | pwm | +-----------+------------+-------------------------------------+ +| CTIMER | on-chip | counter | ++-----------+------------+-------------------------------------+ Targets available ================== diff --git a/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.dts b/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.dts index 8653b410dcc..4865e16784e 100644 --- a/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.dts +++ b/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.dts @@ -137,3 +137,7 @@ &flexpwm1_pwm0 { status = "okay"; }; + +&ctimer0 { + status = "okay"; +}; diff --git a/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.yaml b/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.yaml index ebcaf6c9039..2e9c4f6c283 100644 --- a/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.yaml +++ b/boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0.yaml @@ -22,4 +22,5 @@ supported: - i2c - watchdog - pwm + - counter vendor: nxp