10.07.2015 Views

pic24fj128ga010 family - Microchip

pic24fj128ga010 family - Microchip

pic24fj128ga010 family - Microchip

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PIC24FJ128GA010 FAMILY8.2.2 IDLE MODEIdle mode has these features:• The CPU will stop executing instructions.• The WDT is automatically cleared.• The system clock source remains active. Bydefault, all peripheral modules continue to operatenormally from the system clock source, but canalso be selectively disabled (see Section 8.4“Selective Peripheral Module Control”).• If the WDT or FSCM is enabled, the LPRC willalso remain active.The device will wake from Idle mode on any of theseevents:• Any interrupt that is individually enabled.• Any device Reset.• A WDT time-out.On wake-up from Idle, the clock is re-applied to theCPU and instruction execution begins immediately,starting with the instruction following the PWRSAVinstruction, or the first instruction in the ISR.8.2.3 INTERRUPTS COINCIDENT WITHPOWER SAVE INSTRUCTIONSAny interrupt that coincides with the execution of aPWRSAV instruction will be held off until entry into Sleepor Idle mode has completed. The device will thenwake-up from Sleep or Idle mode.8.3 Doze ModeGenerally, changing clock speed and invoking one ofthe power-saving modes are the preferred strategiesfor reducing power consumption. There may be circumstances,however, where this is not practical. Forexample, it may be necessary for an application tomaintain uninterrupted synchronous communication,even while it is doing nothing else. Reducing systemclock speed may introduce communication errors,while using a power-saving mode may stopcommunications completely.Doze mode is a simple and effective alternative methodto reduce power consumption while the device is stillexecuting code. In this mode, the system clock continuesto operate from the same source and at the samespeed. Peripheral modules continue to be clocked at thesame speed, while the CPU clock speed is reduced.Synchronization between the two clock domains ismaintained, allowing the peripherals to access the SFRswhile the CPU executes code at a slower rate.Doze mode is enabled by setting the DOZEN bit(CLKDIV). The ratio between peripheral and coreclock speed is determined by the DOZE2:DOZE0 bits(CLKDIV). There are eight possibleconfigurations, from 1:1 to 1:256, with 1:1 being thedefault.It is also possible to use Doze mode to selectivelyreduce power consumption in event driven applications.This allows clock sensitive functions, such assynchronous communications, to continue withoutinterruption while the CPU idles, waiting for somethingto invoke an interrupt routine. Enabling the automaticreturn to full-speed CPU operation on interrupts isenabled by setting the ROI bit (CLKDIV). Bydefault, interrupt events have no effect on Doze modeoperation.8.4 Selective Peripheral ModuleControlIdle and Doze modes allow users to substantiallyreduce power consumption by slowing or stopping theCPU clock. Even so, peripheral modules still remainclocked and thus consume power. There may be caseswhere the application needs what these modes do notprovide: the allocation of power resources to CPUprocessing with minimal power consumption from theperipherals.PIC24F devices address this requirement by allowingperipheral modules to be selectively disabled, reducingor eliminating their power consumption. This can bedone with two control bits:• The Peripheral Enable bit, generically named“XXXEN”, located in the module’s main controlSFR.• The Peripheral Module Disable (PMD) bit, genericallynamed “XXXMD”, located in one of the PMDcontrol registers.Both bits have similar functions in enabling or disablingits associated module. Setting the PMD bit for a moduledisables all clock sources to that module, reducing itspower consumption to an absolute minimum. In thisstate, the control and status registers associated with theperipheral will also be disabled, so writes to those registerswill have no effect and read values will be invalid.Many peripheral modules have a corresponding PMDbit.In contrast, disabling a module by clearing its XXXENbit disables its functionality, but leaves its registersavailable to be read and written to. Power consumptionis reduced, but not by as much as the PMD bit does.Most peripheral modules have an enable bit;exceptions include Capture, Compare and RTCC.To achieve more selective power savings, peripheralmodules can also be selectively disabled when thedevice enters Idle mode. This is done through thecontrol bit of the generic name format “XXXIDL”. Bydefault, all modules that can operate during Idle modewill do so. Using the disable on Idle feature allows furtherreduction of power consumption during Idle mode,enhancing power savings for extremely critical powerapplications.DS39747E-page 102© 2009 <strong>Microchip</strong> Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!