samples: boards: stm32: serial_wakeup: Fix nucloe_wb55rg configuration

On STM32WB55 series, wakeup in stop mode is not supported.
Disable this state in order to support this sample.

Add comments to other sections of the configuration.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
This commit is contained in:
Erwan Gouriou 2023-11-16 12:21:20 +01:00 committed by Carles Cufí
commit b4fcbc4eb6

View file

@ -1,19 +1,35 @@
/* /*
* Copyright (c) 2022 Linaro Limited * Copyright (c) 2022 Linaro Limited
* Copyright (c) 2022 STMicroelectronics
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
&clk_hsi { &cpu0{
status = "okay"; /* USART Wakeup requires automatic HSI16 switch on in deepsleep mode
* which isn't possible in Stop Mode 2.
* Remove Stop Mode 2 from supported modes
*/
cpu-power-states = <&stop0 &stop1>;
}; };
&usart1 { &usart1 {
/* Set domain clock to HSI to allow wakeup from Stop mode */
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>, clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>,
<&rcc STM32_SRC_HSI USART1_SEL(2)>; <&rcc STM32_SRC_HSI USART1_SEL(2)>;
/* Configure device as wakeup source */
wakeup-source; wakeup-source;
/* Configure sleep pinctrl configuration which will be used when
* device is not configured as wakeup source by the application.
* This use case is only applicable in PM_DEVICE mode.
*/
pinctrl-1 = <&analog_pb6 &analog_pb7>; pinctrl-1 = <&analog_pb6 &analog_pb7>;
pinctrl-names = "default", "sleep"; pinctrl-names = "default", "sleep";
}; };
&clk_hsi {
/* Make sure HSI is enabled */
status = "okay";
};