Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

PIC24F Family Reference Manual
DS39698A-page 10-6 Advance Information © 2006 Microchip Technology Inc.
10.4 DOZE MODE
Changing clock speed and invoking one of the instruction-based Power-Saving modes are the
preferred strategies for reducing power consumption. There may be circumstances, however,
where this is not practical. For example, it may be necessary for an application to maintain unin-
terrupted synchronous communication, even while it is doing nothing else. Reducing system
clock speed may introduce communication errors, while using a Power-Saving mode may stop
communications completely.
Doze mode provides an alternative method to reduce power consumption while the device is still
executing code. In this mode, the system clock continues to operate from the same source and
at the same speed. Peripheral modules continue to be clocked at the same speed while the CPU
clock speed is reduced. Synchronization between the two clock domains is maintained, allowing
the peripherals to access the SFRs while the CPU executes code at a slower rate.
Doze mode is enabled by setting the DOZEN bit (CLKDIV<11>). The ratio between peripheral
and core clock speed is determined by the DOZE2:DOZE0 bits (CLKDIV<14:12>). There are
eight possible configurations, from 1:1 to 1:256, with 1:1 being the default.
10.4.1 Return from Doze on Interrupt
Doze mode can be configured to automatically return to full-speed CPU execution on an interrupt
event. Enabling the automatic return to full-speed CPU operation on interrupts is enabled by set-
ting the ROI bit (CLKDIV<15>). By default, the ROI bit is cleared, and interrupt events have no
effect on Doze mode operation. When an interrupt event occurs in Doze mode and ROI is set,
the DOZEN bit is automatically cleared.
The return from Doze mode feature allows clock-sensitive functions, such as synchronous com-
munications, to continue without interruption while the CPU executes at a much lower speed,
waiting for an event to invoke an interrupt routine and resume processing.
10.5 SELECTIVE PERIPHERAL POWER CONTROL
Sleep, Idle and Doze modes allow users to substantially reduce power consumption by slowing or
stopping the CPU clock. Even so, peripheral modules still remain clocked and thus consume some
amount of power. There may be cases where the application needs what these modes do not
provide: the ability to allocate limited power resources to the CPU while eliminating power con-
sumption from the peripherals. PIC24F devices address this requirement by allowing peripheral
modules to be selectively enabled or disabled, reducing or eliminating their power consumption.
10.5.1 Disabling Peripheral Modules
Most of the peripheral modules in the PIC24F family architecture can be selectively disabled,
reducing or essentially eliminating their power consumption during all operating modes. Two
different options are available to users, each with a slightly different effect.
10.5.1.1 MODULE ENABLE BIT (XXXEN)
Many peripheral modules have a Module Enable bit, generically named, “XXXEN”, usually located
in bit position 15 of their control registers (or primary control registers for more complex modules).
Here, “XXX” represents the mnemonic form for the module of the module name. For example, the
enable bit for an SPI™ module is “SPIEN”, and so on. The bit is provided for all serial and parallel
communications modules and the Real-Time Clock. Clearing this bit disables the module’s
operation; however, it continues to receive clock signals and draw a minimal amount of current.
As with all earlier PICmicro
®
devices, timers continue to be under selective operation and are con-
trolled by their own TON bit, also located in position 15. The A/D Converter also has a legacy
enable bit, ADON, that has the same function as the XXXEN bits. I/O ports and features associated
with them, such as input change notification and input capture, do not have their own Module
Enable bits, since their operation is secondary to other modules.
Disabling modules not required for a particular application in this manner allows for the selective
and dynamic adjusting power consumption under software control as the application is running.

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh