diff --git a/boards/st/nucleo_wb07cc/doc/index.rst b/boards/st/nucleo_wb07cc/doc/index.rst index 69187a7b1e86..15a2cfc2fe40 100644 --- a/boards/st/nucleo_wb07cc/doc/index.rst +++ b/boards/st/nucleo_wb07cc/doc/index.rst @@ -52,6 +52,8 @@ The Zephyr ``nucleo_wb07cc`` board target supports the following hardware featur +-----------+------------+-------------------------------------+ | ADC | on-chip | adc | +-----------+------------+-------------------------------------+ +| TIMER | on-chip | counter, pwm | ++-----------+------------+-------------------------------------+ | RADIO | on-chip | Bluetooth Low Energy | +-----------+------------+-------------------------------------+ diff --git a/boards/st/nucleo_wb07cc/nucleo_wb07cc.dts b/boards/st/nucleo_wb07cc/nucleo_wb07cc.dts index 7e8cbf67fa61..4b53c858e923 100644 --- a/boards/st/nucleo_wb07cc/nucleo_wb07cc.dts +++ b/boards/st/nucleo_wb07cc/nucleo_wb07cc.dts @@ -39,6 +39,13 @@ }; }; + pwmleds: pwmleds { + compatible = "pwm-leds"; + pwm_red_led_1: pwm_red_led_1 { + pwms = <&pwm1 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + }; + }; + gpio_keys { compatible = "gpio-keys"; user_button_1: button_0 { @@ -62,6 +69,7 @@ led0 = &blue_led_1; led1 = &green_led_1; led2 = &red_led_1; + pwm-led0 = &pwm_red_led_1; sw0 = &user_button_1; sw1 = &user_button_2; sw2 = &user_button_3; @@ -122,6 +130,17 @@ <&rcc STM32_SRC_SYSCLK SPI2_I2S2_SEL(1)>; }; +&timers1 { + status = "okay"; + st,prescaler = <10000>; + + pwm1: pwm { + status = "okay"; + pinctrl-0 = <&tim1_ch3_pb2>; + pinctrl-names = "default"; + }; +}; + &flash0 { partitions { compatible = "fixed-partitions"; diff --git a/boards/st/nucleo_wb07cc/nucleo_wb07cc.yaml b/boards/st/nucleo_wb07cc/nucleo_wb07cc.yaml index 9a263bce7370..030cbf1ba026 100644 --- a/boards/st/nucleo_wb07cc/nucleo_wb07cc.yaml +++ b/boards/st/nucleo_wb07cc/nucleo_wb07cc.yaml @@ -12,9 +12,11 @@ supported: - adc - arduino_i2c - arduino_spi + - counter - dma - gpio - i2c + - pwm - spi - bluetooth vendor: st