File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,25 @@ static int frdm_mcxa156_init(void)
129
129
CLOCK_AttachClk (kFRO12M_to_ADC0 );
130
130
131
131
CLOCK_EnableClock (kCLOCK_GateADC0 );
132
+ #endif
133
+
134
+ #if DT_NODE_HAS_STATUS_OKAY (DT_NODELABEL (lptmr0 ))
135
+
136
+ /*
137
+ * Clock Select Decides what input source the lptmr will clock from
138
+ *
139
+ * 0 <- Reserved
140
+ * 1 <- 16K FRO
141
+ * 2 <- Reserved
142
+ * 3 <- Combination of clocks configured in MRCC_LPTMR0_CLKSEL[MUX] field
143
+ */
144
+ #if DT_PROP (DT_NODELABEL (lptmr0 ), clk_source ) == 0x1
145
+ CLOCK_SetupFRO16KClocking (kCLKE_16K_SYSTEM | kCLKE_16K_COREMAIN );
146
+ #elif DT_PROP (DT_NODELABEL (lptmr0 ), clk_source ) == 0x3
147
+ CLOCK_SetClockDiv (kCLOCK_DivLPTMR0 , 1u );
148
+ CLOCK_AttachClk (kFRO12M_to_LPTMR0 );
149
+ #endif /* DT_PROP(DT_NODELABEL(lptmr0), clk_source) */
150
+
132
151
#endif
133
152
134
153
/* Set SystemCoreClock variable. */
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ The FRDM-MCXA156 board configuration supports the following hardware features:
58
58
+-----------+------------+-------------------------------------+
59
59
| DAC | on-chip | dac |
60
60
+-----------+------------+-------------------------------------+
61
+ | LPTMR | on-chip | counter |
62
+ +-----------+------------+-------------------------------------+
61
63
| PWM | on-chip | pwm |
62
64
+-----------+------------+-------------------------------------+
63
65
Original file line number Diff line number Diff line change 107
107
pinctrl-0 = <&pinmux_lpadc0>;
108
108
pinctrl-names = "default";
109
109
};
110
+
111
+ &lptmr0 {
112
+ status = "okay";
113
+ };
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ supported:
18
18
- adc
19
19
- flash
20
20
- gpio
21
+ - counter
21
22
- dac
22
23
- pwm
23
24
vendor : nxp
You can’t perform that action at this time.
0 commit comments