Skip to content

Commit 7be1a81

Browse files
erwangofabiobaltieri
authored andcommitted
samples: stm32: serial_wakeup: b_u585i_iot02a support
Add a sample overlay for b_u585i_iot02a Signed-off-by: Erwan Gouriou <[email protected]>
1 parent a38c8d2 commit 7be1a81

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2023 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&cpu0{
8+
/* USART Wakeup requires automatic HSI16 switch on in deepsleep mode
9+
* which isn't possible in Stop Mode 2.
10+
* Remove Stop Mode 2 from supported modes
11+
*/
12+
cpu-power-states = <&stop0 &stop1>;
13+
};
14+
15+
&usart1 {
16+
/* Set domain clock to HSI to allow wakeup from Stop mode */
17+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x00004000>,
18+
<&rcc STM32_SRC_HSI16 USART1_SEL(2)>;
19+
20+
/* Configure device as wakeup source */
21+
wakeup-source;
22+
23+
/* Configure sleep pinctrl configuration which will be used when
24+
* device is not configured as wakeup source by the application.
25+
* This use case is only applicable in PM_DEVICE mode.
26+
*/
27+
pinctrl-1 = <&analog_pa9 &analog_pa10>;
28+
pinctrl-names = "default", "sleep";
29+
};
30+
31+
&clk_hsi {
32+
/* Make sure HSI is enabled */
33+
status = "okay";
34+
};

0 commit comments

Comments
 (0)