
115
XMEGA A [MANUAL]
8077I–AVR–11/2012
Figure 10-1. Battery backup system and its power domain implementation.
10.3.1 Power Supervisor
The power supervisor monitors the voltage on the VBAT pin. It performs three main functions:
The power-on detection (BBPOD) function detects when power is applied to the VBAT pin, i.e., when the backup battery is
inserted. When this happens the battery backup power-on detection flag (BBPODF) is set and the power switch is
disconnected to prevent the backup battery from being drained before the device is configured.
The brown-out detection (BBBOD) function monitors the VBAT voltage level when the system is powered from the VBAT
pin. If the VBAT voltage drops below a threshold voltage, the battery backup bod flag (BBBODF) is set. The BBBOD
samples the VBAT voltage level at around a 1Hz rate, and is designed for detecting slow voltage changes. The BBBOD is
turned off when the device runs from the main power.
The power detection (BBPWR) function controls the VBAT voltage after a reset. If no voltage is present on the VBAT pin,
the battery backup power flag will be set. This indicates that the backup battery is not present or has been drained.
BBPODF, BBBODF, and the BBPWR flag are later referred to as the power supervision flags.
10.3.2 Power Switch
The power switch switches between main power and the VBAT pin to power the system. This happens automatically, and
is controlled from the main BOD in the device.
10.3.3 Crystal Oscillator with Failure Monitor
The crystal oscillator (XOSC) supports connection of a external 32.768kHz crystal. It provides a prescaled clock output
selectable to 1.024kHz or 1Hz. The crystal oscillator is designed for ultra low power consumption and by default is
configured for low ESR and load capacitance crystals. It is possible to enable a high ESR mode to drive crystals with high
ESR or load capacitance, but this will increase current consumption. The crystal oscillator failure monitor will detect if the
crystal is permanently or temporarily stopped and then set the crystal oscillator failure flag.
Power
switch
VDD
VBAT
TOSC1
TOSC2
VBAT
power
supervisor
Crystal
Oscillator
RTC
Failure
monitor
Backup
Registers
Main
power
supervision
Oscillator &
sleep
controller
FLASH,
EEPROM
& Fuses
Watchdog w/
Ooscillator
Internal
RAM
GPIO
XTAL2
XTAL1
OCD &
Programming
Interface
Level
shifters
/
Isolation
CPU
&
Peripherals