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 <francois.ramu@st.com>
This commit is contained in:
parent
90d1644a10
commit
8043fb922a
1 changed files with 32 additions and 0 deletions
32
samples/basic/blinky_pwm/boards/nucleo_l4r5zi.overlay
Normal file
32
samples/basic/blinky_pwm/boards/nucleo_l4r5zi.overlay
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Copyright (c) 2022 STMicroelectronics
|
||||
*/
|
||||
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
#include <dt-bindings/pwm/stm32_pwm.h>
|
||||
|
||||
/ {
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
red_pwm_led: red_pwm_led {
|
||||
pwms = <&pwm1 2 4 (PWM_POLARITY_NORMAL | PWM_STM32_COMPLEMENTARY)>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
pwm-led0 = &red_pwm_led;
|
||||
};
|
||||
};
|
||||
|
||||
&timers1 {
|
||||
status = "okay";
|
||||
|
||||
pwm1: pwm {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&tim1_ch2n_pb14>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue