About ST
Products
Applications
Support
Buy
News & Events
ST Worldwide
Contact Us
Login
Application Notes
|
Industrial
|
Lighting Control
|
8-bit Microcontrollers
|
ST7 - 8-bit Microcontrollers
Using an active RC to wakeup the ST7LITE0 from power saving mode
Application Note
Format:
(101 kb)
or
(9 kb)
Last Updated: 28/02/2008
Pages: 7
Related Datasheets
8-bit microcontroller with single voltage Flash memory, data EEPROM, ADC, timers, SPI
Related Information
Source file for using an active RC to wakeup the ST7LITE0 from power SAVING mode
Raw Ascii Text
- (
Hide
)
(Unformatted textual content of the document used by search engines)
AN1605 APPLICATION NOTE
USING AN ACTIVE RC TO WAKEUP THE ST7LITE0 FROM POWER SAVING MODE
by Microcontroller Division Applications
1 INTRODUCTION
This application note investigates the power consumption during the operation of a typical application which puts the MCU (ST7Lite0) in HALT mode and wakes it up at regular intervals by an external interrupt generated by an active RC circuit. It also lists the typical consumption values and the parameters on which this consumption depends. The internal Pull up (Rpu) of an I/O port is used for the active RC to minimise the num ber of external components. The value of the Rpu varies with the supply voltage of the MCU and with temperature. Externally, only one capacitor is used. The ST7LITE0 clock source is configured by option byte to be internal RC with PLL*8. All measurements are taken at ambient temperature. 1.1 HARDWARE SOLUTION Figure 1 shows the Hardware setup used to measure the consumption (IDD) at different power supply voltages. Figure 1. Hardware Setup
VDD PA0
EI0
RPU
CEXT
1.2 POWER CONSUMPTION The power consumption depends mainly on the time period between each wakeup from HALT (external interrupt interval). The wakeup time period is controlled by the RC time constant. The va lu e of the C e xt is fixed but the internal pull-up value varies with the MCU power supply volta ge and with temperature.
AN1605/0403
1/7
1
The typical values of the Rpu at different power supply voltages is given in Table 1. Table 1. Rpu values for different power supply conditions
Setup No. 1 2 Conditions VDD = 5.0 V VDD = 3.0 V Rpu (Minimum) 50 k Rpu (Typical) 120 k 160 k R pu (Maximum) 250 k -
The consumption is measured for two different values of Cext, given in Table 2 and Table 3. Table 2. Consumption for Cext = 1 F
Average IDD (mA) Setup No. VDD (Volts) 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 Consumption in Run mode 1.44 1.73 2.0 2.28 2.59 2.95 3.34 3.55 3.73 3. 93 4. 12 4. 31 4. 54 4.75 Average IDD (A) Consumption in Power saving mode 15.6 20. 6 26.6 35.2 41.8 48.6 56.6 66.2 75.3 83.4 95.4 105.2 117.4 129.4 Ext Interrupt Interval (ms) 154.0 131.2 114.0 101.2 90.8 80.8 72.4 67.2 62.6 59.2 55.2 53.0 50.6 48.0 IDD (A) Consumption when MCU is in HALT
1 2 3 4 5 6 7 8 9 10 11 12 13 14
0.1
2/7
2
Table 3. Consumption for Cext = 0.47 F
Setup No. VDD (Volts) 2. 4 2. 6 2. 8 3. 0 3. 2 3. 4 3. 6 3. 8 4. 0 4. 2 4. 4 4. 6 4. 8 5. 0 Averag e I DD (mA) Consumption in Run mode 1.45 1.74 2.01 2.29 2.60 2.95 3.34 3.54 3.75 3. 91 4. 12 4. 31 4. 51 4.73 Average IDD (A) Consumption in Power saving mode 19.6 25. 1 32.1 39.0 46.2 54.2 62.5 71.7 81.2 91.8 101.9 112.6 124.0 135.4 Ext Interrupt Interval (ms) 69.8 60.0 52.2 46.6 42.1 38.0 35.2 32.8 30.8 29.2 27.7 26.5 25.4 24.3 IDD (A) Consumption when MCU is in HALT
1 2 3 4 5 6 7 8 9 10 11 12 13 14
0.1
The parameters on which the consumption depends are as follows:
s
The MCU inserts a delay of 256 CPU cycles to stabilize the internal RC, during this time it consumes some current.
For example at 3.6V, the details of the duration of different modes are as follows: MCU in Halt mode: 72.00 ms MCU in Run mode (delay period + capacitor discharge time) : 211.2 s
3/7
Figure 2. Overview of the Consumption Parameters IDD mA
3.5
Run mode
Halt mode
TTEMPO
Run mode 211s
Halt mode
72ms
0.0002
t The exact calculation of the delay period is given as follows: When the PLLx4x8 is selected, it delivers the clock after 60 cycles of the clock source (for a 1 MHz clock source, the delay due to the PLL is 60s). The total delay at oscillator start up with PLLx4x8 is given by the formula: Ttempo = [(60*Tclock_source) + (256*Tcpu_clock)] where, Tclock_source represents the time period for one clock cycle of the clock source, and Tcpu_clock represents the time for one cpu clock cycle.
s
To discharge the capacitor, a software delay of 294 cycles has to be inserted before putting the MCU in Halt again, so that the capacitor is fully discharged before recharging it. This is the optimum delay at which minimum consumption is achieved. For minimum consumption in Halt mode: all the port pins should be configured as push pull outp ut at low level (normally the consumption in this configuration is approx. 0.1 ~ 0.2 uA), but the pin to which the external interrupt is connected (PA0), has to be configured as pull up interrupt. Hence, while the MCU is in Halt mode with this configuration, it consumes more than 0.2 A. The MCU cannot be kept in Halt for longer than the time it takes the capacitor to charge up to Vdd level. This is because as soon as the capacitor charges to approximately 0.7Vdd, the MCU detects it as external interrupt (the interrupt sensitivity is configured for rising edge) and comes out of Halt mode.
s
s
4/7
s
The charging time is mainly controlled through the capacitor value. But if the capacitor value is increased beyond 1uF, although the interval between external interrupts (in ms) is increased, the capacitor itself consumes more current while charging. Hence, the average consumption is high in this case. A summary of the consumption and the external interrupt interval for Cext = 2.2uF and 4.7uF is shown in Table 4. It can be seen from this table that even though the external interrupt interval is longer than in Tables 2 & 3, the consumption is higher. Table 4. Power Consumption and Ext. Interrupt Interval for Cext = 2.2 F and Cext = 4.7 F
Setup No. C= 2.2F Average IDD (A) Ext Interrupt Consumption in Interval (ms) power saving mode 35.6 171.6 86.4 107.6 146.6 83.6 C= 4.7F Average IDD (A) Consumption in Ext Interrupt Interval. (ms) Power saving mode 48.9 200.0 114.5 124.2 189.6 97.2
VDD (Volts)
1 2 3
3.0 4.0 5.0
If a different hardware setup is used, where an external series R (to generate the external inte rru pt through an external RC combination) is connected, the capacitor charging time decre ase s drastically. For example, when a series R of 490K is added, the charging time decreases to 6.7s. Hence, the period the MCU stays in Halt mode is very small, causing more consumption. As a conclusion, the best result (minimum consumption) is achieved with a 1F capacitor value and using an internal pullup. This is illustrated in Figure 3. Figure 3 shows the average IDD consumption in Halt mode and Run mode respectively with the two different capacitor values (Cext = 1.0 uF and 0.47uF) used for the active RC.
5/7
Figure 3. Average IDD Consumption Run and Halt Mode
Average Consumption IDD (mA
5 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 2. 4 3 3. 6 4. 2 4. 8 5 Vdd (Volts) Run mode (Cext=1.0uF) Run mode (Cext=0.47uF)
Halt mode (Cext=1.0uF)
Average Consumption IDD (uA)
0.16 0.14 0.12 0.1 0.08 0.06 0.04 0.02 0 2.4 3 3.6 4 .2 4.8 5
Halt mode (Cext=0.47 uF)
V dd (Volts)
1.3 SOFTWARE SOLUTION The software is written in assembly. First the PA0 port (through which the external interrupt is taken to the MCU) is configured as pull-up interrupt. The sensitivity of the interrupt is configured as rising edge. Then the capacitor is charged through software and immediately the MCU is put into HALT. As soon as the capacitor charges to nearly 0.7Vdd, the MCU detects it as an external interrupt and comes out of Halt mode. The capacitor is discharged through software. And a small software delay of 294 cycles is then provided to let the capacitor discharge fully before it recharges and wakes up the MCU from Halt mode with another external interrupt. The MCU is again put into Halt and the same process is repeated. All the source files in assembly code is given in the zip file with this application note. The source files are for guidance only. STMicroelectronics shall not be held liable for any direct, indirect or consequential damages with respect to any claims arising from use of this software.
6/7
THE PRESENT NOTE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH A NOTE AND/OR THE USE MADE BY CUSTOMERS OF THE INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS."
Information furnished is believed to be accurate and reliable. However, STMicroelectronics assumes no responsibility for the consequences of use of such information nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by implication or otherwise under any patent or patent rights of STMicroelectronics. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. STMicroelectronics products are not authorized for use as critical components in life support devices or systems without the express written approval of STMicroelectronics. The ST logo is a registered trademark of STMicroelectronics 2003 STMicroelectronics - All Rights Reserved. Purchase of I2C Components by STMicroelectronics conveys a license under the Philips I2C Patent. Rights to use these components in an I2C system is granted provided that the system conforms to the I2C Standard Specification as defined by Philips. STMicroelectronics Group of Companies Australia - Brazil - Canada - China - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Singapore - Spain - Sweden - Switzerland - United Kingdom - U.S.A. http://www.st.com
7/7
Document Number: 9512