Skip to content

Commit

Permalink
samples: blinky pwm running on the nucleo_l4r5zi
Browse files Browse the repository at this point in the history
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]>
GitOrigin-RevId: 8043fb9
Change-Id: If69f9d5d32ac716e1ba9daf3ce36a868a59051d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/3562859
Tested-by: CopyBot Service Account <[email protected]>
Reviewed-by: Keith Short <[email protected]>
Commit-Queue: Keith Short <[email protected]>
Tested-by: Keith Short <[email protected]>
  • Loading branch information
FRASTM authored and Chromeos LUCI committed Mar 31, 2022
1 parent 7b1a16d commit 0f5731e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions samples/basic/blinky_pwm/boards/nucleo_l4r5zi.overlay
Original file line number Diff line number Diff line change
@@ -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";
};
};

0 comments on commit 0f5731e

Please sign in to comment.