Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
83
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

Power management

RM0016

 

 

10.1.1Clock management for low consumption

Slowing down the system clock

In Run mode, choosing the oscillator to be used as the system clock source is very important to ensure the best compromise between performance and consumption. The selection is done by programming the clock controller registers. Refer to the Clock control (CLK) section.

As a further measure, fCPU can be reduced by writing to the CPUDIV[2:0] bits in the Clock divider register (CLK_CKDIVR). This reduces the speed of the CPU and consequently the

power consumption of the MCU. The other peripherals (clocked by fMASTER) are not affected by this setting.

To return to full speed at any time in Run mode, clear the CPUDIV[2:0] bits.

Peripheral clock gating

For additional power saving you can use peripheral clock gating (PCG). This can be done at any time by selectively enabling or disabling the fMASTER clock connection to individual peripherals. Refer to the Clock control (CLK) section.

These settings are effective in both Run and Wait modes.

10.2Low power modes

The main characteristics of the four low power modes are summarized in Table 20.

Table 20. Low power mode management

Mode

Main voltage

 

 

 

Wakeup trigger

(consumption

Oscillators

CPU

Peripherals

regulator

event

level)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

All internal interrupts

Wait

On

On

Off

On(1)

(including AWU) or

( - )

external interrupts,

 

 

 

 

 

 

 

 

 

reset

 

 

 

 

 

 

Active-halt

 

Off

 

Only AWU(2)

AWU or external(3)

On

except LSI (or

Off

( - - )

interrupts, reset

 

HSE)

 

 

 

 

 

 

 

 

 

 

 

 

 

Active-halt with

Off

Off

 

Only AWU(2)

AWU or external(3)

MVR auto power off

(low power

Off

except LSI only

interrupts, reset

( - - - )

regulator on)

 

 

 

 

 

 

 

 

 

 

 

 

Halt

Off

 

 

Off(2)

External(3) interrupts,

(low power

Off

Off

( - - - - )

reset

regulator on)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1.If the peripheral clock is not disabled by peripheral clock gating function.

2.If activated, BEEP or IWDG stay switched on. In this case, the LSI clock is forced to run.

3.Including communication peripheral interrupts.

102/454

Doc ID 14587 Rev 9

RM0016

Power management

 

 

10.2.1Wait mode

Wait mode is entered from Run mode by executing a WFI (wait for interrupt) instruction: this stops the CPU but allows the other peripherals and interrupt controller to continue to run. Therefore the consumption decreases accordingly. Wait mode can be combined with PCG (peripheral clock gating), reduced CPU clock frequency and low mode clock source selection (LSI, HSI) to further reduce the power consumption of the device. Refer to the

Clock control (CLK) description.

In Wait mode, all the registers and RAM contents are preserved, the previously defined clock configuration remains unchanged (Clock master status register (CLK_CMSR)).

When an internal or external interrupt request occurs, the CPU wakes-up from Wait mode and resumes processing.

10.2.2Halt mode

In this mode the master clock is stopped. This means that the CPU and all the peripherals

clocked by fMASTER or by derived clocks are disabled. As a result, none of the peripherals are clocked and the digital part of the MCU consumes almost no power.

In Halt mode, all the registers and RAM contents are preserved, by default the clock configuration remains unchanged (Clock master status register (CLK_CMSR)).

The MCU enters Halt mode when a HALT instruction is executed. Wakeup from Halt mode is triggered by an external interrupt, sourced by a GPIO port configured as interrupt input or an Alternate Function pin capable of triggering a peripheral interrupt.

In this mode the MVR regulator is switched off to save power. Only the LPVR regulator (and brown-out reset) is active.

Fast clock wakeup

The HSI RC start-up time is much faster than the HSE crystal start-up time (refer to the Electrical Parameters in the datasheet). Therefore, to optimize the MCU wakeup time, it is

recommended to select the HSI clock as the fMASTER clock source before entering Halt mode.

This selection can be done without clock switching using the FHWU bit in the Internal clock register (CLK_ICKR). Refer to the Clock control (CLK) chapter.

10.2.3Active-halt modes

Active-halt mode is similar to Halt mode except that it does not require an external interrupt for wakeup. It uses the AWU to generate a wakeup event internally after a programmable delay.

In Active-halt mode, the main oscillator, the CPU and almost all the peripherals are stopped.

Only the LSI RC or HSE oscillators are running to drive the AWU counters and IWD counter if enabled.

To enter Active-halt mode, first enable the AWU as described in the AWU section. Then execute a HALT instruction.

Doc ID 14587 Rev 9

103/454

Соседние файлы в папке Минимум документации STM8