Skip to content

Commit b4fcbc4

Browse files
erwangocarlescufi
authored andcommitted
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 <[email protected]>
1 parent e5ab70b commit b4fcbc4

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
/*
22
* Copyright (c) 2022 Linaro Limited
3+
* Copyright (c) 2022 STMicroelectronics
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
67

7-
&clk_hsi {
8-
status = "okay";
8+
&cpu0{
9+
/* USART Wakeup requires automatic HSI16 switch on in deepsleep mode
10+
* which isn't possible in Stop Mode 2.
11+
* Remove Stop Mode 2 from supported modes
12+
*/
13+
cpu-power-states = <&stop0 &stop1>;
914
};
1015

1116
&usart1 {
17+
/* Set domain clock to HSI to allow wakeup from Stop mode */
1218
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>,
1319
<&rcc STM32_SRC_HSI USART1_SEL(2)>;
1420

21+
/* Configure device as wakeup source */
1522
wakeup-source;
1623

24+
/* Configure sleep pinctrl configuration which will be used when
25+
* device is not configured as wakeup source by the application.
26+
* This use case is only applicable in PM_DEVICE mode.
27+
*/
1728
pinctrl-1 = <&analog_pb6 &analog_pb7>;
1829
pinctrl-names = "default", "sleep";
1930
};
31+
32+
&clk_hsi {
33+
/* Make sure HSI is enabled */
34+
status = "okay";
35+
};

0 commit comments

Comments
 (0)