Skip to content

Commit 8043fb9

Browse files
FRASTMcarlescufi
authored andcommitted
samples: blinky pwm running on the nucleo_l4r5zi
Adding an overlay to configure the nucleo_l4r5zi for testing the pwm blinky application on red led (PB14 on nucleo board) Each has a specific pwm output from different timers/channels Signed-off-by: Francois Ramu <[email protected]>
1 parent 90d1644 commit 8043fb9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2022 STMicroelectronics
5+
*/
6+
7+
#include <dt-bindings/pwm/pwm.h>
8+
#include <dt-bindings/pwm/stm32_pwm.h>
9+
10+
/ {
11+
pwmleds {
12+
compatible = "pwm-leds";
13+
14+
red_pwm_led: red_pwm_led {
15+
pwms = <&pwm1 2 4 (PWM_POLARITY_NORMAL | PWM_STM32_COMPLEMENTARY)>;
16+
};
17+
};
18+
19+
aliases {
20+
pwm-led0 = &red_pwm_led;
21+
};
22+
};
23+
24+
&timers1 {
25+
status = "okay";
26+
27+
pwm1: pwm {
28+
status = "okay";
29+
pinctrl-0 = <&tim1_ch2n_pb14>;
30+
pinctrl-names = "default";
31+
};
32+
};

0 commit comments

Comments
 (0)