Skip to content

Commit 374aab1

Browse files
str4t0mcfriedt
authored andcommitted
boards: nucleo_l476rg and nucleo_wb55rg add timers
nucleo_l476rg: adds tim3 with pwm on pb4, changes tim2 pwm pin from pa0 to pb10. As a result timers are available on arduino pins D5 and D6. nucleo_wb55rg: adds tim1 with pwm on pa8, changes tim2 pwm pin from pa0 to pa15. As a result timers are available on arduino pins D5 and D6. Use default prescaler (==1) for 32-bit timer and 10.001 for 16-bit timers, as these are commonly used. Signed-off-by: Thomas Stranger <[email protected]>
1 parent 405c697 commit 374aab1

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

boards/arm/nucleo_l476rg/nucleo_l476rg.dts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,17 @@
140140

141141
pwm2: pwm {
142142
status = "okay";
143-
pinctrl-0 = <&tim2_ch1_pa0>;
143+
pinctrl-0 = <&tim2_ch3_pb10>;
144+
};
145+
};
146+
147+
&timers3 {
148+
status = "okay";
149+
150+
pwm3: pwm {
151+
status = "okay";
152+
st,prescaler = <10000>;
153+
pinctrl-0 = <&tim3_ch1_pb4>;
144154
};
145155
};
146156

boards/arm/nucleo_wb55rg/nucleo_wb55rg.dts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,21 @@
133133
status = "okay";
134134
};
135135

136+
&timers1 {
137+
status = "okay";
138+
139+
pwm1: pwm {
140+
status = "okay";
141+
st,prescaler = <10000>;
142+
pinctrl-0 = <&tim1_ch1_pa8>;
143+
};
144+
};
145+
136146
&timers2 {
137147
status = "okay";
138148
pwm2: pwm {
139149
status = "okay";
140-
pinctrl-0 = <&tim2_ch1_pa0>;
150+
pinctrl-0 = <&tim2_ch1_pa15>;
141151
};
142152
};
143153

0 commit comments

Comments
 (0)