Skip to content

Commit 405c697

Browse files
str4t0mcfriedt
authored andcommitted
boards: nucleo_g0b1 add timers, move spi2, nucleo_g474, add timers
nucleo_g0b1re: removes spi2 from arduino header pins to ST morpho pins in order to free pins for other peripherals. Adds tim15 with pwm on pb14, changes tim3 pwm to pb4. As a result timers are available on arduino pins D5 and D6. nucleo g474re: Adds timer 3 with pwm pin on pb4 and changes tim2 pwm pin from pa5 to pb10. 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 ef97121 commit 405c697

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

boards/arm/nucleo_g0b1re/nucleo_g0b1re.dts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@
9090
pwm3: pwm {
9191
status = "okay";
9292
st,prescaler = <10000>;
93-
pinctrl-0 = <&tim3_ch1_pa6>;
93+
pinctrl-0 = <&tim3_ch1_pb4>;
94+
};
95+
};
96+
97+
&timers15 {
98+
status = "okay";
99+
pwm15: pwm {
100+
status = "okay";
101+
st,prescaler = <10000>;
102+
pinctrl-0 = <&tim15_ch1_pb14>;
94103
};
95104
};
96105

@@ -113,8 +122,8 @@
113122
};
114123

115124
&spi2 {
116-
pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13
117-
&spi2_miso_pb14 &spi2_mosi_pb15>;
125+
pinctrl-0 = <&spi2_nss_pd0 &spi2_sck_pd1
126+
&spi2_miso_pd3 &spi2_mosi_pd4>;
118127
status = "okay";
119128
};
120129

boards/arm/nucleo_g474re/nucleo_g474re.dts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,16 @@
116116

117117
pwm2: pwm {
118118
status = "okay";
119-
pinctrl-0 = <&tim2_ch1_pa5>;
119+
pinctrl-0 = <&tim2_ch3_pb10>;
120+
};
121+
};
122+
123+
&timers3 {
124+
status = "okay";
125+
pwm3: pwm {
126+
status = "okay";
127+
st,prescaler = <10000>;
128+
pinctrl-0 = <&tim3_ch1_pb4>;
120129
};
121130
};
122131

0 commit comments

Comments
 (0)