Skip to content

Commit 7137969

Browse files
sarthsmartgalak
authored andcommitted
boards: arm: stm32l562e_dk: Enabling PWM support in device tree
This commit enables PWM support for stm32l562e_dk platform in device tree. Signed-off-by: Sidhdharth Yadav <[email protected]>
1 parent cf80205 commit 7137969

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

boards/arm/stm32l562e_dk/doc/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ The Zephyr stm32l562e_dk board configuration supports the following hardware fea
170170
+-----------+------------+-------------------------------------+
171171
| RNG | on-chip | True Random Number Generator |
172172
+-----------+------------+-------------------------------------+
173+
| PWM | on-chip | PWM |
174+
+-----------+------------+-------------------------------------+
173175

174176
Other hardware features are not yet supported on this Zephyr port.
175177

@@ -193,6 +195,7 @@ Default Zephyr Peripheral Mapping:
193195
- SPI_1 SCK/MISO/MOSI : PG2/PG3/PG4 (BT SPI bus)
194196
- USER_PB : PC13
195197
- LD10 : PG12
198+
- PWM_2_CH1 : PA0
196199

197200
System Clock
198201
------------

boards/arm/stm32l562e_dk/stm32l562e_dk.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@
3838
&lptim1 {
3939
status = "okay";
4040
};
41+
42+
&timers2 {
43+
pwm {
44+
st,prescaler = <10000>;
45+
};
46+
};

boards/arm/stm32l562e_dk/stm32l562e_dk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ supported:
1010
- i2c
1111
- lsm6dso
1212
- lptim
13+
- pwm
1314
ram: 192
1415
flash: 512

boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,12 @@
115115
label = "SPBTLE-RF";
116116
};
117117
};
118+
119+
&timers2 {
120+
status = "okay";
121+
122+
pwm2: pwm {
123+
status = "okay";
124+
pinctrl-0 = <&tim2_ch1_pa0>;
125+
};
126+
};

0 commit comments

Comments
 (0)