From 33d4ac43e6eb630f7e10fde02f5e2ee29991b75b Mon Sep 17 00:00:00 2001 From: Waqas Mazhar Date: Fri, 27 Aug 2021 00:44:49 +0000 Subject: [PATCH] samples: basic: blinky_pwm: Add support for nucleo_wb55rg platform Create a board overlay file in the application directory to add pwm-led0 entry over default device tree. Also, include instruction in the README file that connection of external LED at pin PA8 is required for the demo to work. Signed-off-by: Waqas Mazhar --- samples/basic/blinky_pwm/README.rst | 2 ++ .../blinky_pwm/boards/nucleo_wb55rg.overlay | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 samples/basic/blinky_pwm/boards/nucleo_wb55rg.overlay diff --git a/samples/basic/blinky_pwm/README.rst b/samples/basic/blinky_pwm/README.rst index 802dd9e58bb..6c558fd4cd4 100644 --- a/samples/basic/blinky_pwm/README.rst +++ b/samples/basic/blinky_pwm/README.rst @@ -58,6 +58,8 @@ In these other cases, however, manual wiring is necessary: - connect PWM2 (PA0) to an LED * - :ref:`nucleo_f103rb_board` - connect PWM1 (PA8) to an LED + * - :ref:`nucleo_wb55rg_board` + - connect PWM1 (PA8) to an LED Building and Running ******************** diff --git a/samples/basic/blinky_pwm/boards/nucleo_wb55rg.overlay b/samples/basic/blinky_pwm/boards/nucleo_wb55rg.overlay new file mode 100644 index 00000000000..103dd44283f --- /dev/null +++ b/samples/basic/blinky_pwm/boards/nucleo_wb55rg.overlay @@ -0,0 +1,18 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright (c) 2021 Planet Innovation + */ + +/ { + pwmleds { + compatible = "pwm-leds"; + external_pwm_led: external_pwm_led { + pwms = <&pwm1 1 0 PWM_POLARITY_NORMAL>; + }; + }; + + aliases { + pwm-led0 = &external_pwm_led; + }; +};