English
Language : 

LM3S8938 Datasheet, PDF (115/550 Pages) List of Unclassifed Manufacturers – Microcontroller
LM3S8938 Microcontroller
7.2.2
7.2.3
7.2.4
Clock Source
The Hibernation module must be clocked by an external source, even if the RTC feature will not be
used. An external oscillator or crystal can be used for this purpose. To use a crystal, a 4.194304-MHz
crystal is connected to the XOSC0 and XOSC1 pins. This clock signal will be divided by 128 internally
to produce the 32.768-kHz clock reference. To use a more precise clock source, a 32.768-kHz
oscillator can be connected to the XOSC0 pin.
The clock source is enabled by setting the CLK32EN bit of the HIBCTL register. The type of clock
source is selected by setting the CLKSEL bit to 0 for a 4.194304-MHz clock source, and to 1 for a
32.768-kHz clock source. If the bit is set to 0, the input clock is divided by 128, resulting in a
32.768-kHz clock source. If a crystal is used for the clock source, the software must leave a delay
of tXOSC_SETTLE after setting the CLK32EN bit and before any other accesses to the Hibernation
module registers. The delay allows the crystal to power up and stabilize. If an oscillator is used for
the clock source, no delay is needed.
Battery Management
The Hibernation module can be independently powered by a battery or an auxiliary power source.
The module can monitor the voltage level of the battery and detect when the voltage becomes too
low. When this happens, an interrupt can be generated. The module can also be configured so that
it will not go into Hibernate mode if the battery voltage is too low.
Note that the Hibernation module draws power from whichever source (VBAT or VDD) has the higher
voltage. Therefore, it is important to design the circuit to ensure that VDD is higher that VBAT under
nominal conditions or else the Hibernation module draws power from the battery even when VDD
is available.
The Hibernation module can be configured to detect a low battery condition by setting the LOWBATEN
bit of the HIBCTL register. In this configuration, the LOWBAT bit of the HIBRIS register will be set
when the battery level is low. If the VABORT bit is also set, then the module is prevented from entering
Hibernation mode when a low battery is detected. The module can also be configured to generate
an interrupt for the low-battery condition (see “Interrupts and Status” on page 116).
Real-Time Clock
The Hibernation module includes a 32-bit counter that increments once per second with a proper
clock source and configuration (see “Clock Source” on page 115). The 32.768-kHz clock signal is
fed into a trim predivider which counts down from a nominal value of 0x7FFF to achieve a once per
second clock rate for the RTC. The trim predivider register can be adjusted up or down to compensate
for inaccuracies in the clock source. The trim predivider should be adjusted up from 0x7FFF in order
to slow down the RTC rate, and down from 0x7FFF in order to speed up the RTC rate.
The Hibernation module includes two 32-bit match registers that are compared to the value of the
RTC counter. The match registers can be used to wake the processor from hibernation mode, or
to generate an interrupt to the processor if it is not in hibernation.
The RTC must be enabled with the RTCEN bit of the HIBCTL register. The value of the RTC can be
set at any time by writing to the HIBRTCLD register. The trim predivider can be adjusted by reading
and writing the HIBRTCT register. The predivider is updated once every 64 seconds from this
register. The two match registers can be set by writing to the HIBRTCM0 and HIBRTCM1 registers.
The RTC can be configured to generate interrupts by using the interrupt registers (see “Interrupts
and Status” on page 116).
June 14, 2007
115
Luminary Micro Confidential-Advance Product Information