File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ The ``frdm_mcxc444`` board target supports the following hardware features:
61
61
+-----------+------------+-------------------------------------+
62
62
| PIT | on-chip | counter |
63
63
+-----------+------------+-------------------------------------+
64
+ | PWM | on-chip | pwm |
65
+ +-----------+------------+-------------------------------------+
64
66
| RTC | on-chip | counter |
65
67
+-----------+------------+-------------------------------------+
66
68
| USB | on-chip | USB device |
Original file line number Diff line number Diff line change 33
33
slew-rate = "slow";
34
34
};
35
35
};
36
+ pinmux_tpm0: pinmux_tpm0 {
37
+ group0 {
38
+ pinmux = <TPM0_CH2_PTE29>,
39
+ <TPM0_CH4_PTE31>,
40
+ <TPM0_CH5_PTD5>;
41
+ drive-strength = "low";
42
+ slew-rate = "slow";
43
+ };
44
+ };
36
45
};
Original file line number Diff line number Diff line change 18
18
led0 = &red_led;
19
19
led1 = &green_led;
20
20
led2 = &blue_led;
21
+ pwm-led0 = &red_pwm_led;
22
+ pwm-led1 = &green_pwm_led;
23
+ pwm-led2 = &blue_pwm_led;
24
+ red-pwm-led = &red_pwm_led;
25
+ green-pwm-led = &green_pwm_led;
26
+ blue-pwm-led = &blue_pwm_led;
21
27
sw0 = &user_button_2;
22
28
sw1 = &user_button_3;
23
29
accel0 = &fxls8974;
30
+ pwm-0 = &tpm0;
24
31
};
25
32
26
33
chosen {
46
53
};
47
54
};
48
55
56
+ pwmleds {
57
+ compatible = "pwm-leds";
58
+ status = "disabled";
59
+ red_pwm_led: pwm_led_0 {
60
+ pwms = <&tpm0 4 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
61
+ label = "PWM Red LED";
62
+ };
63
+ green_pwm_led: pwm_led_1 {
64
+ pwms = <&tpm0 5 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
65
+ label = "PWM Green LED";
66
+ };
67
+ blue_pwm_led: pwm_led_2 {
68
+ pwms = <&tpm0 2 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
69
+ label = "PWM Blue LED";
70
+ };
71
+ };
72
+
49
73
gpio_keys {
50
74
compatible = "gpio-keys";
51
75
user_button_2: button_2 {
@@ -142,6 +166,13 @@ i2c0: &i2c0 {
142
166
status = "okay";
143
167
};
144
168
169
+ &tpm0 {
170
+ status = "okay";
171
+ pinctrl-0 = <&pinmux_tpm0>;
172
+ pinctrl-names = "default";
173
+ clocks = <&sim KINETIS_SIM_OSCERCLK 0x103C 24>;
174
+ };
175
+
145
176
zephyr_udc0: &usb {
146
177
status = "okay";
147
178
num-bidir-endpoints = <8>;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ supported:
20
20
- gpio
21
21
- i2c
22
22
- uart
23
+ - pwm
23
24
- usb_device
24
25
- usbd
25
26
testing :
You can’t perform that action at this time.
0 commit comments