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:
Francois Ramu 2022-03-22 11:06:52 +01:00 committed by Carles Cufí
commit 8043fb922a

View 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";
};
};