Skip to content

Commit 3d2059f

Browse files
lucien-nxpkartben
authored andcommitted
boards: nxp: mimxrt700_evk: enable sc_timer as pwm function
enable sc_timer for cm33_cpu0 core. test tests/drivers/pwm/pwm_api case passed. Signed-off-by: Lucien Zhao <[email protected]>
1 parent c2ea1ac commit 3d2059f

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

boards/nxp/mimxrt700_evk/board.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,10 @@ void board_early_init_hook(void)
432432
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(wwdt0))
433433
CLOCK_AttachClk(kLPOSC_to_WWDT0);
434434
#endif
435+
436+
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sc_timer), okay)
437+
CLOCK_AttachClk(kFRO0_DIV6_to_SCT);
438+
#endif
435439
}
436440

437441
static void GlikeyWriteEnable(GLIKEY_Type *base, uint8_t idx)

boards/nxp/mimxrt700_evk/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ the hardware features below.
7171
+-----------+------------+-------------------------------------+
7272
| SYSTICK | on-chip | systick |
7373
+-----------+------------+-------------------------------------+
74+
| SCTimer | on-chip | pwm |
75+
+-----------+------------+-------------------------------------+
7476
| IOCON | on-chip | pinmux |
7577
+-----------+------------+-------------------------------------+
7678
| I2C | on-chip | i2c |

boards/nxp/mimxrt700_evk/mimxrt700_evk-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,13 @@
7575
nxp,analog-mode;
7676
};
7777
};
78+
79+
pinmux_sctimer: pinmux_sctimer {
80+
group0 {
81+
pinmux = <SCT0_IN0_PIO0_0>;
82+
slew-rate = "normal";
83+
drive-strength = "normal";
84+
input-enable;
85+
};
86+
};
7887
};

boards/nxp/mimxrt700_evk/mimxrt700_evk_mimxrt798s_cm33_cpu0.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
sw0 = &user_button_1;
2222
sw1 = &user_button_2;
2323
watchdog0 = &wwdt0;
24+
pwm-0 = &sc_timer;
2425
};
2526

2627
chosen {
@@ -132,6 +133,12 @@
132133
status = "okay";
133134
};
134135

136+
&sc_timer {
137+
status = "okay";
138+
pinctrl-0 = <&pinmux_sctimer>;
139+
pinctrl-names = "default";
140+
};
141+
135142
&xspi0 {
136143
status = "okay";
137144

0 commit comments

Comments
 (0)