Deep Power Off Mode
I need to minimize the current consumption in my board which uses a LPC1768. Now I don't have any problem with going into Deep Sleep or Power-Down modes and waking up from those modes. I have configured the RTC to generate an interrupt after some predefined time which does wake up the MCU correctly and works just fine.
Deep Power Off Mode
My problem occurs when I want to go into Deep Power-Down mode which is precisely what I need (its consumes much less power). But after generating the RTC Interrupt the MCU goes into a reset state and starts the execution from the beginning as if someone pushes the reset button!Now why is that? I read from the documents (like this example: AN10915: Using the LPC1700 power modes) that these three routines are pretty much the same.
My problem occurs when I want to go into Deep Power-Down mode which is precisely what I need (its consumes much less power). But after generating the RTC Interrupt the MCU goes into a reset state and starts the execution from the beginning as if someone pushes the reset button !
2.2.4Deep power-down modeIn Deep Power-down mode, power is shut off to the entire chip with the exception of the Real-Time Clock, the RESET pin, the WIC, and the RTC backup registers. To optimize power conservation, the user has the additional option of turning off or retaining power to the 32 kHz oscillator. It is also possible to use external circuitry to turn off power to the on-chip regulator via the VDD(REG)(3V3) pins after entering Deep power-down mode. Power to the on-chip regulator must be restored before device operation can be restarted.Wake-up from Deep power-down mode will occur when an external reset signal is applied, or the RTC interrupt is enabled and an RTC interrupt is generated.
Ok thanks. Yeah I realized that. But maybe it was better to mention in the documents that by going into Deep Power-Down mode after an interrupt (Reset or RTC) an actual Reset is going to happen and you loose all SRAM contents! It would have been more clear!
So, before you enter in the deep power down mode, please store your important data to the GPREG[0-4] register, these registers can be used to store important information when the main power supply is off. The value in these registers is not affected by chip reset.
Power driver provides two API's POWER_EnablePD() and POWER_DisablePD() to enable or disable the PDRUNCFG bits in SYSCON The PDRUNCFG has an inverted logic i.e. the peripheral is powered on when the bit is cleared and powered off when bit is set. So the API POWER_DisablePD() is used to power on a peripheral and POWER_EnablePD() is used to power off a peripheral. The API's take a parameter of type pd_bit_t which organizes the PDRUNCFG bits. The driver also provides two separate API's to power down and power up Flash, POWER_PowerDownFlash() and POWER_PowerUpFlash()
The power driver provides two API's POWER_EnableDeepSleep() and POWER_DisableDeepSleep() to enable or disable the deep sleep bit in the ARM Core. POWER_EnableDeepSleep() is used to enable deep sleep and POWER_DisableDeepSleep() is used to disable deep sleep.
The Power library provides two API's to enter low power modes i.e. Deep Sleep and Deep Power Down. Deep Sleep is a sleep mode in which the ARM Core, Flash and many other peripheral are turned off to save power. The processor can be woken by an IO activity and will resume executing from next instruction after sleep. If a peripheral or RAM needs to On for wakeup or to retain memory then those peripheral need to be kept on during deep sleep. Deep power down is a power down mode where the processor resets upon wake up and during power down the entire part is powered down except for the RTC. For Deep Power Down only the Reset and RTC Alarm or WakeUp can be wakeup sources. The power library provides an API POWER_EnterDeepSleep() to enter deep sleep mode. This function takes a parameter which is a bit mask of the PDRUNCFG register. Any bit that is set will be powered on during deep sleep. So this mask would usually has the RAM memory that needs to retain power and also any wakeup source. The API POWER_EnterDeepPowerDown() is used to enter deep power down mode. This API also has a parameter but since the volatge is cut off for the peripheral this parameter has no effect
The power library provides API's to set the voltage for the desired operating frequency of the processor. The voltage regulation system can be in normal regulation mode or in low power regulation mode. The API POWER_SetVoltageForFreq() is used to set the voltage for normal regulation mode. Based on the frequency parameter the optimum voltage level is set. The API POWER_SetLowPowerVoltageForFreq() is used to set the low power voltage regulation mode and set the voltages for the desired frequency. For POWER_SetLowPowerVoltageForFreq() only two FRO frequencies are supported, 12MHz and 48MHz.
This area of the BIOS seems to be the most misunderstood. When these settings are not properly configured, the result can be systems that do not shut down correctly, or that enter or awaken from the Standby or Hibernate modes improperly. Since Windows has built-in power management, you'll want to disable all power management in the BIOS. Otherwise, the two fight with each other, and neither works properly. Motherboard manufacturers don't assume that everyone is using Windows, so many of these settings exist for non-Windows users.
ACPI Suspend to RAM : ACPI stands for Advanced Configuration and Power Interface - not to be confused with APIC or IPCA, which some people may find as options in their BIOS setup programs. The Suspend to RAM feature, sometimes referred to as S3/STR, lets the PC save more power when in Standby mode, but all devices within or attached to the computer must be ACPI-compliant. Some BIOS's offer an S1/POS option for this scenario. If you enable this feature and experience problems with the standby mode, simply go back into the BIOS and disable it.
Video Off Method : The DPMS (Display Power Management System) option allows the BIOS to control the video display card if it supports the DPMS feature. The Blank Screen option simply blanks the screen - use this for monitors without either power-management or "green" features. The V/H SYNC Blank option blanks the screen and turns off vertical and horizontal scanning. If your computer and monitor were built within the last four years, I recommend setting this to DPMS.
HDD Down In Suspend : This feature determines whether the hard-disk drive is automatically shut down when the computer enters Suspend mode. While most power settings of this type are controlled within Windows, if you find the hard drive is not powering down when the computer enters Suspend mode - assuming your computer even allows Suspend and Hibernate modes - then enable this option. Otherwise, the recommended setting is Disabled.
PWR Button : By default, all ATX computers will power off after the power button is held for more than four seconds. This setting tells the computer what to do if the power button is held down for less than four seconds. The options are to power off the system or enter Suspend mode. This setting is up to you.
Wake/Power Up on Ext. Modem : This setting tells the computer to turn itself on when a phone line plugged into its modem rings. Once again, this is used for remote administration. For other environments - in other words, most users - I recommend you set this to Disabled.
AC Power Loss Restart : This option lets you tell the PC what to do when power is restored after an unexpected loss of power. Disabled leaves the system off, while Enabled reboots the system. Previous State sets the system back to the state it was in before the power interruption. I recommend you set this to Disabled.
I'm struggling with Wake on LAN on an Revo 3700.In the American Megatrends v02.69 BIOS, I have:Integrated PeripheralsOnboard LAN Controller = EnabledPower Management SetupACPI Suspend Mode = S3 (STR) (Network Connectivity — Understanding WOL Opens a new window Opens a new window is useful for explanation of these different modes)Deep Power Off Mode = Enabled (this seems only to refer to when the machine is actually off, and I am testing from "Sleep")Power on by PCIE Devices = Enabled (this would seem to be the important one)Now, it's important to note at this point that in this thread (squeezebox with revo 3700 wake up Opens a new window Opens a new window), a user mentions that if the American Megatrends BIOS is being used (which mine has), you should see "Power By Onboard LAN" in the BIOS, which I don't have. So this might be the issue - but as far as I can tell, a PCI Event would be the same/similar?In Windows 7 I have:Device Manager>Realtek PCIe GBE Family Contoller>Properties>Advanced..Energy Efficient Ethernet: DisabledGreen Ethernet: DisabledWake on Magic Packet: EnabledWake on Pattern Match: EnabledShutdown Wake On Lan: EnabledWOL and Shutdown Link Speed: 100Mbps first (I have tried this on 10Mbps)Device Manager>Realtek PCIe GBE Family Contoller>Properties>Power Management...[x] Allow the computer to turn off the device to save power (have tried turning this off)[x] Allow this device to wake up the computer[x] Only allow a magic packet to wake the computerThese are all ticked.And I am also allowing Hybrid Sleep mode from the main power options, and have tried disabling this!None of this is working. One thing which I'm expecting to see but am still not is that the LAN port LED on the back of the NIC is not flashing/on when the machine is sleeping/off - do you ALWAYS see this when a