Skip to content

Commit 527a225

Browse files
michal-smolanashif
authored andcommitted
boards: frdm_mcxc242: Add counters support
mcxc242 has lptmr, pit and rtc counters, but it is not documented and not listed in frdm_mcxc242.yaml. Add the counters to board documentation, to the yaml file, and enable it explicitly in board dts. Set rtc clock to 32 kHz oscillator. Signed-off-by: Michal Smola <[email protected]>
1 parent 8a674e1 commit 527a225

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

boards/nxp/frdm_mcxc242/doc/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ The ``frdm_mcxc242`` board target supports the following hardware features:
7070
+-----------+------------+-------------------------------------+
7171
| ADC | on-chip | adc |
7272
+-----------+------------+-------------------------------------+
73+
| LPTMR | on-chip | counter |
74+
+-----------+------------+-------------------------------------+
75+
| PIT | on-chip | counter |
76+
+-----------+------------+-------------------------------------+
77+
| RTC | on-chip | counter |
78+
+-----------+------------+-------------------------------------+
7379

7480

7581
Targets available

boards/nxp/frdm_mcxc242/frdm_mcxc242.dts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
&sim {
8989
pllfll-select = <KINETIS_SIM_PLLFLLSEL_MCGPLLCLK>;
90-
er32k-select = <KINETIS_SIM_ER32KSEL_LPO1KHZ>;
90+
er32k-select = <KINETIS_SIM_ER32KSEL_OSC32KCLK>;
9191
};
9292

9393
&cpu0 {
@@ -153,3 +153,23 @@ i2c1: &i2c1 {
153153
pinctrl-0 = <&pinmux_adc0>;
154154
pinctrl-names = "default";
155155
};
156+
157+
&lptmr0 {
158+
status = "okay";
159+
};
160+
161+
&rtc {
162+
status = "okay";
163+
};
164+
165+
&pit0 {
166+
status = "okay";
167+
};
168+
169+
&pit0_channel0 {
170+
status = "okay";
171+
};
172+
173+
&pit0_channel1 {
174+
status = "okay";
175+
};

boards/nxp/frdm_mcxc242/frdm_mcxc242.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ supported:
1919
- i2c
2020
- pwm
2121
- adc
22+
- counter
2223
testing:
2324
ignore_tags:
2425
- net

0 commit comments

Comments
 (0)