Skip to content

Commit 5b31aca

Browse files
Mathieu Choplainkartben
authored andcommitted
boards: st: nucleo_wb07cc: add PWM support and LED
Add the PWM LED to Nucleo-WB07CC board and mark as compatible with PWM. Also mark counters as supported (but don't enable by default). Signed-off-by: Mathieu Choplain <[email protected]>
1 parent 784629b commit 5b31aca

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

boards/st/nucleo_wb07cc/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ The Zephyr ``nucleo_wb07cc`` board target supports the following hardware featur
5252
+-----------+------------+-------------------------------------+
5353
| ADC | on-chip | adc |
5454
+-----------+------------+-------------------------------------+
55+
| TIMER | on-chip | counter, pwm |
56+
+-----------+------------+-------------------------------------+
5557
| RADIO | on-chip | Bluetooth Low Energy |
5658
+-----------+------------+-------------------------------------+
5759

boards/st/nucleo_wb07cc/nucleo_wb07cc.dts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@
3939
};
4040
};
4141

42+
pwmleds: pwmleds {
43+
compatible = "pwm-leds";
44+
pwm_red_led_1: pwm_red_led_1 {
45+
pwms = <&pwm1 3 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
46+
};
47+
};
48+
4249
gpio_keys {
4350
compatible = "gpio-keys";
4451
user_button_1: button_0 {
@@ -62,6 +69,7 @@
6269
led0 = &blue_led_1;
6370
led1 = &green_led_1;
6471
led2 = &red_led_1;
72+
pwm-led0 = &pwm_red_led_1;
6573
sw0 = &user_button_1;
6674
sw1 = &user_button_2;
6775
sw2 = &user_button_3;
@@ -122,6 +130,17 @@
122130
<&rcc STM32_SRC_SYSCLK SPI2_I2S2_SEL(1)>;
123131
};
124132

133+
&timers1 {
134+
status = "okay";
135+
st,prescaler = <10000>;
136+
137+
pwm1: pwm {
138+
status = "okay";
139+
pinctrl-0 = <&tim1_ch3_pb2>;
140+
pinctrl-names = "default";
141+
};
142+
};
143+
125144
&flash0 {
126145
partitions {
127146
compatible = "fixed-partitions";

boards/st/nucleo_wb07cc/nucleo_wb07cc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ supported:
1212
- adc
1313
- arduino_i2c
1414
- arduino_spi
15+
- counter
1516
- dma
1617
- gpio
1718
- i2c
19+
- pwm
1820
- spi
1921
- bluetooth
2022
vendor: st

0 commit comments

Comments
 (0)