Skip to content

Commit 44dfa8b

Browse files
lkoudelkakartben
authored andcommitted
boards: nucleo_wba55cg: Add timer3 and pwmleds configuration
Added timer3 and pwmleds configuration to the nucleo_wba55cg board DTS file. This includes setting the prescaler, enabling the pwm3 node with the appropriate pin control settings, and configuring the pwmleds node with green_pwm_led. Signed-off-by: Lubos Koudelka <[email protected]>
1 parent 0085b34 commit 44dfa8b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

boards/st/nucleo_wba55cg/nucleo_wba55cg.dts

+20
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@
4343
};
4444
};
4545

46+
pwmleds: pwmleds {
47+
compatible = "pwm-leds";
48+
49+
green_pwm_led: green_pwm_led {
50+
pwms = <&pwm3 2 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
51+
};
52+
};
53+
4654
gpio_keys {
4755
compatible = "gpio-keys";
4856
user_button_1: button_0 {
@@ -66,6 +74,7 @@
6674
led0 = &blue_led_1;
6775
led1 = &green_led_2;
6876
led2 = &red_led_3;
77+
pwm-led0 = &green_pwm_led;
6978
sw0 = &user_button_1;
7079
sw1 = &user_button_2;
7180
sw2 = &user_button_3;
@@ -166,6 +175,17 @@
166175
status = "okay";
167176
};
168177

178+
&timers3 {
179+
st,prescaler = <10000>;
180+
status = "okay";
181+
182+
pwm3: pwm {
183+
status = "okay";
184+
pinctrl-0 = <&tim3_ch2_pa9>;
185+
pinctrl-names = "default";
186+
};
187+
};
188+
169189
stm32_lp_tick_source: &lptim1 {
170190
clocks = <&rcc STM32_CLOCK_BUS_APB7 0x00000800>,
171191
<&rcc STM32_SRC_LSE LPTIM1_SEL(3)>;

0 commit comments

Comments
 (0)