Download Stellaris Peripheral Driver Library User's Guide

Transcript
Hibernation Module
Description:
Enables the low battery detection and whether hibernation is allowed if a low battery is detected. If low battery detection is enabled, then a low battery condition will be indicated in the
raw interrupt status register, and can also trigger an interrupt. Optionally, hibernation can be
aborted if a low battery is detected.
The ulLowBatFlags parameter is one of the following values:
HIBERNATE_LOW_BAT_DETECT - detect a low battery condition.
HIBERNATE_LOW_BAT_ABORT - detect a low battery condition, and abort hibernation
if low battery is detected.
Returns:
None.
10.2.2.15 HibernateRequest
Requests hibernation mode.
Prototype:
void
HibernateRequest(void)
Description:
This function requests the Hibernation module to disable the external regulator, thus removing
power from the processor and all peripherals. The Hibernation module will remain powered
from the battery or auxiliary power supply.
The Hibernation module will re-enable the external regulator when one of the configured wake
conditions occurs (such as RTC match or external WAKE pin). When the power is restored
the processor will go through a normal power-on reset. The processor can retrieve saved
state information with the HibernateDataGet() function. Prior to calling the function to request
hibernation mode, the conditions for waking must have already been set by using the HibernateWakeSet() function.
Note that this function may return because some time may elapse before the power is actually
removed, or it may not be removed at all. For this reason, the processor will continue to execute
instructions for some time and the caller should be prepared for this function to return. There
are various reasons why the power may not be removed. For example, if the HibernateLowBatSet() function was used to configure an abort if low battery is detected, then the power will
not be removed if the battery voltage is too low. There may be other reasons, related to the
external circuit design, that a request for hibernation may not actually occur.
For all these reasons, the caller must be prepared for this function to return. The simplest way
to handle it is to just enter an infinite loop and wait for the power to be removed.
Returns:
None.
10.2.2.16 HibernateRTCDisable
Disables the RTC feature of the Hibernation module.
January 11, 2011
143