boards: nxp: frdm_mcxn947: updated board support for CTimer
Updated the frdm_mcxn947 with support for the CTimer counter. Signed-off-by: William Tang <william.tang@nxp.com> Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
This commit is contained in:
parent
13735ff789
commit
4c47df19df
|
@ -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;
|
||||
|
||||
|
|
|
@ -80,6 +80,8 @@ The FRDM-MCXN947 board configuration supports the following hardware features:
|
|||
+-----------+------------+-------------------------------------+
|
||||
| PWM | on-chip | pwm |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| CTIMER | on-chip | counter |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Targets available
|
||||
==================
|
||||
|
|
|
@ -137,3 +137,7 @@
|
|||
&flexpwm1_pwm0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ctimer0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -22,4 +22,5 @@ supported:
|
|||
- i2c
|
||||
- watchdog
|
||||
- pwm
|
||||
- counter
|
||||
vendor: nxp
|
||||
|
|
Loading…
Reference in a new issue