diff --git a/boards/arm/stm32l562e_dk/doc/index.rst b/boards/arm/stm32l562e_dk/doc/index.rst index 61ebb75a245..e4f457a3e75 100644 --- a/boards/arm/stm32l562e_dk/doc/index.rst +++ b/boards/arm/stm32l562e_dk/doc/index.rst @@ -170,6 +170,8 @@ The Zephyr stm32l562e_dk board configuration supports the following hardware fea +-----------+------------+-------------------------------------+ | RNG | on-chip | True Random Number Generator | +-----------+------------+-------------------------------------+ +| PWM | on-chip | PWM | ++-----------+------------+-------------------------------------+ Other hardware features are not yet supported on this Zephyr port. @@ -193,6 +195,7 @@ Default Zephyr Peripheral Mapping: - SPI_1 SCK/MISO/MOSI : PG2/PG3/PG4 (BT SPI bus) - USER_PB : PC13 - LD10 : PG12 +- PWM_2_CH1 : PA0 System Clock ------------ diff --git a/boards/arm/stm32l562e_dk/stm32l562e_dk.dts b/boards/arm/stm32l562e_dk/stm32l562e_dk.dts index a7d669b1134..82cd54ab1c4 100644 --- a/boards/arm/stm32l562e_dk/stm32l562e_dk.dts +++ b/boards/arm/stm32l562e_dk/stm32l562e_dk.dts @@ -38,3 +38,9 @@ &lptim1 { status = "okay"; }; + +&timers2 { + pwm { + st,prescaler = <10000>; + }; +}; diff --git a/boards/arm/stm32l562e_dk/stm32l562e_dk.yaml b/boards/arm/stm32l562e_dk/stm32l562e_dk.yaml index 62628b7a37c..fe1d27a6103 100644 --- a/boards/arm/stm32l562e_dk/stm32l562e_dk.yaml +++ b/boards/arm/stm32l562e_dk/stm32l562e_dk.yaml @@ -10,5 +10,6 @@ supported: - i2c - lsm6dso - lptim + - pwm ram: 192 flash: 512 diff --git a/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi b/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi index 4a81554fb19..39280cd6d07 100644 --- a/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi +++ b/boards/arm/stm32l562e_dk/stm32l562e_dk_common.dtsi @@ -115,3 +115,12 @@ label = "SPBTLE-RF"; }; }; + +&timers2 { + status = "okay"; + + pwm2: pwm { + status = "okay"; + pinctrl-0 = <&tim2_ch1_pa0>; + }; +};