AN2857
Application note
STM8S and STM8A family power management
Introduction
This application note is intended for system designers who require a hardware
implementation overview of the low-power modes of the STM8S and STM8A product
families. It shows how to use the STM8S and STM8A devices in these modes, describes
how to take power consumption and wakeup time measurements, and gives results for such
measurements.
Example firmware is provided with this application note for implementing and measuring the
consumption and wakeup time of the different STM8S and STM8A functioning modes.
August 2011
Doc ID 15241 Rev 3
1/31
www.st.com
Contents
AN2857
Contents
1
2
Power consumption factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Power supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1
2.2
2.3
2.4
Internal supply structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Analog supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
IO supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3
Clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1
3.2
Clock system overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Clock configuration and power management . . . . . . . . . . . . . . . . . . . . . . 11
4
Run and low-power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1
4.2
Run mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2.1
4.2.2
4.2.3
Entering wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Exiting wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Activation level/low-power mode control . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3
Active halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3.1
4.3.2
4.3.3
4.3.4
Entering active halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Exiting active halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Voltage regulator and Flash configuration during halt phase . . . . . . . . . 16
AWU unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.4
Halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.4.1
4.4.2
4.4.3
Entering halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Exiting halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Flash configuration during halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5
Power consumption and wakeup time measurements and results . . 18
5.1
Power consumption measurements and results . . . . . . . . . . . . . . . . . . . . 18
5.1.1
5.1.2
5.1.3
Measurement configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Power consumption results in run mode . . . . . . . . . . . . . . . . . . . . . . . . 21
Power consumption results in wait mode . . . . . . . . . . . . . . . . . . . . . . . . 22
2/31
Doc ID 15241 Rev 3
AN2857
5.1.4
5.1.5
5.1.6
Contents
Power consumption results in active halt mode . . . . . . . . . . . . . . . . . . . 23
Power consumption results in halt mode . . . . . . . . . . . . . . . . . . . . . . . . 23
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2
Wakeup time measurements and results . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.2.1
5.2.2
5.2.3
5.2.4
5.2.5
5.2.6
Measurement configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Wakeup time results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Wakeup time results in wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Wakeup time results in active halt mode . . . . . . . . . . . . . . . . . . . . . . . . 26
Wakeup time results in halt mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6
Power management tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.1
6.2
Rules to help minimize power consumption . . . . . . . . . . . . . . . . . . . . . . . 29
Choosing the optimal low-power mode for an application . . . . . . . . . . . . 29
7
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Doc ID 15241 Rev 3
3/31
List of tables
AN2857
List of tables
Table 1.
Table 2.
Table 3.
Table 4.
Table 5.
Table 6.
Table 7.
Table 8.
Table 9.
Table 10.
Table 11.
Table 12.
Table 13.
Table 14.
Table 15.
Clock source comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Clock selection table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Functioning modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Active halt mode configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Power consumption results in run mode, code executed from Flash . . . . . . . . . . . . . . . . . 21
Power consumption results in run mode, code executed from RAM . . . . . . . . . . . . . . . . . 21
Power consumption results in wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Power consumption results in active halt mode (MVR on LPVR off) . . . . . . . . . . . . . . . . . 23
Power consumption results in active halt mode (MVR off LPVR on) . . . . . . . . . . . . . . . . . 23
Power consumption results in halt mode (MVR off LPVR on) . . . . . . . . . . . . . . . . . . . . . . 23
Wakeup time results in wait mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Wakeup time results in active halt mode (MVR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Wakeup time results in active halt mode (LPVR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Wakeup time results in halt mode (LPVR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4/31
Doc ID 15241 Rev 3
AN2857
List of figures
List of figures
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figure 7.
Power supply overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Clock tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Active halt diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Power supply setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Crystal oscillator setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
External clock setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Wakeup time measurement diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Doc ID 15241 Rev 3
5/31