File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
samples/boards/stm32/power_mgmt/serial_wakeup/boards Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 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+ };
You can’t perform that action at this time.
0 commit comments