blob: 77f1767df6e7ce454e2abe29027bce79acde5342 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/**
@page PWR_EnterStopMode PWR standby example
@verbatim
******************************************************************************
* @file Examples_LL/PWR/PWR_EnterStopMode/readme.txt
* @author MCD Application Team
* @brief Description of the PWR Stop 1 mode example.
******************************************************************************
*
* Copyright (c) 2019-2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
@endverbatim
@par Example Description
How to enter the Stop 1 mode.
After start-up LED2 is toggling during 5 seconds, then the system automatically
enter in Stop 1 mode (Final state).
LED2 is used to monitor the system state as follows:
- LED2 toggling : system in Run mode
- LED2 off : system in Stop 1 mode
This example does not implement a wake-up source from any peripheral: to wake-up the device,
press on Reset button.
@note This example can not be used in DEBUG mode due to the fact
that the Cortex-M4 core is no longer clocked during low power mode
so debugging features are disabled.
@note On STM32WB, both CPU1 and CPU2 must be in Stop mode to set the entire system in Stop mode.
In this example, CPU2 is not started-up and CPU1 configures the CPU2 Stop mode.
If this example would be ported to another application, user must manage CPU2 entering Stop mode.
@par Keywords
Power, PWR, Stop mode, Interrupt, Low Power
@par Directory contents
- PWR/PWR_EnterStopMode/Inc/stm32wbxx_it.h Interrupt handlers header file
- PWR/PWR_EnterStopMode/Inc/main.h Header for main.c module
- PWR/PWR_EnterStopMode/Inc/stm32_assert.h Template file to include assert_failed function
- PWR/PWR_EnterStopMode/Src/stm32wbxx_it.c Interrupt handlers
- PWR/PWR_EnterStopMode/Src/main.c Main program
- PWR/PWR_EnterStopMode/Src/system_stm32wbxx.c STM32WBxx system source file
@par Hardware and Software environment
- This example runs on STM32WB15CCUx devices.
- This example has been tested with STMicroelectronics NUCLEO-WB15CC
board and can be easily tailored to any other supported device
and development board.
- NUCLEO-WB15CC Set-up
- LED2 connected to PB.00 pin
@par How to use it ?
In order to make the program work, you must do the following :
- Open your preferred toolchain
- Rebuild all files and load your image into target memory
- Run the example
* <h3><center>© COPYRIGHT STMicroelectronics</center></h3>
*/
|