From c6bba39f4d8d4ac4148a59e5d8cdc0c26b9c9926 Mon Sep 17 00:00:00 2001 From: Erwan Gouriou Date: Thu, 16 Nov 2023 12:29:34 +0100 Subject: [PATCH] dts: stm32wl: Configure LPUART wakeup line Rather than configuring in serial_wakeup sample, define LPUART1 wakeup line in wl.dtsi file. Additionally make few cosmetic changes to nucleo_wl55rj overlay in serial wakeup sample. Signed-off-by: Erwan Gouriou --- dts/arm/st/wl/stm32wl.dtsi | 1 + .../serial_wakeup/boards/nucleo_wl55jc.overlay | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dts/arm/st/wl/stm32wl.dtsi b/dts/arm/st/wl/stm32wl.dtsi index cc4b4dc31c9..feeb013af6e 100644 --- a/dts/arm/st/wl/stm32wl.dtsi +++ b/dts/arm/st/wl/stm32wl.dtsi @@ -259,6 +259,7 @@ clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000001>; resets = <&rctl STM32_RESET(APB1H, 0U)>; interrupts = <38 0>; + wakeup-line = <28>; status = "disabled"; }; diff --git a/samples/boards/stm32/power_mgmt/serial_wakeup/boards/nucleo_wl55jc.overlay b/samples/boards/stm32/power_mgmt/serial_wakeup/boards/nucleo_wl55jc.overlay index 83c607ff8a0..8b6b062cd67 100644 --- a/samples/boards/stm32/power_mgmt/serial_wakeup/boards/nucleo_wl55jc.overlay +++ b/samples/boards/stm32/power_mgmt/serial_wakeup/boards/nucleo_wl55jc.overlay @@ -4,17 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ -&clk_lse { - status = "okay"; -}; -/* LPUART1 clock source on LSE : set console at 9600 */ &lpuart1 { - /delete-property/ clocks; + /* Set domain clock to LSE to allow wakeup from Stop mode */ clocks = <&rcc STM32_CLOCK_BUS_APB1_2 0x00000001>, <&rcc STM32_SRC_LSE LPUART1_SEL(3)>; + /* LPUART1 clock source on LSE : set console at 9600 */ current-speed = <9600>; + + /* Enable as wakeup source */ wakeup-source; - wakeup-line = <28>; +}; + +&clk_lse { + /* Make sure LSE clock is enabled */ + status = "okay"; };