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 <thomas.stranger@outlook.com>
This commit is contained in:
Thomas Stranger 2021-04-08 13:27:31 +02:00 committed by Christopher Friedt
commit 374aab1ea3
2 changed files with 22 additions and 2 deletions

View file

@ -140,7 +140,17 @@
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa0>;
pinctrl-0 = <&tim2_ch3_pb10>;
};
};
&timers3 {
status = "okay";
pwm3: pwm {
status = "okay";
st,prescaler = <10000>;
pinctrl-0 = <&tim3_ch1_pb4>;
};
};

View file

@ -133,11 +133,21 @@
status = "okay";
};
&timers1 {
status = "okay";
pwm1: pwm {
status = "okay";
st,prescaler = <10000>;
pinctrl-0 = <&tim1_ch1_pa8>;
};
};
&timers2 {
status = "okay";
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa0>;
pinctrl-0 = <&tim2_ch1_pa15>;
};
};