
118
XMEGA A [MANUAL]
8077I–AVR–11/2012
10.6.2 STATUS: Status register
Bit 7 – BBPWR: Battery Backup Power
This flag is set if no power is detected on the VBAT pin when the device leaves reset. The flag can be cleared by writing a
one to this bit location.
Bit 6:4 – Reserved
These bits are unused and reserved for future use. For compatibility with future devices, always write these bits to zero
when this register is written.
Bit 3 – XOSCRDY: Crystal Oscillator Ready
This flag is set when the 32.678kHz crystal oscillator has started and is stable and ready. The flag can be cleared by
applying a reset to the battery backup system. The actual start-up time is crystal dependent. Refer to the datasheet for
the crystal oscillator used for more information.
Bit 2 – XOSCFAIL: Crystal Oscillator Failure
This flag is set if a crystal oscillator failure is detected. The flag can be cleared by writing a one to this bit location or by
applying a reset to the battery backup system.
Bit 1 – BBBODF: Battery Backup Brown-out Detection Flag
This flag is set if battery backup BOD is detected when the battery backup system is powered from the VBAT pin. The flag
can be cleared by writing a one to this bit location. This flag is not valid when BBPWR is set.
Bit 0 – BBPODF: Battery Backup Power-on Detection Flag
This flag is set if battery backup power-on is detected; i.e., when power is connected to the VBAT pin. The flag is updated
only during device startup when main power is applied. Applying or reapplying power to the VBAT pin while main power is
present will not change this flag until main power is removed and re-applied. The flag can be cleared by writing a one to
this bit location. This flag is not valid when BBPWR is set.
10.6.3 BACKUP0: Backup register 0
Bit 7:0 – BACKUP0[7:0]: Backup value 0
This register can be used to store data in the battery backup system before the main power is lost or removed.
Bit
7
6
5
4
3210
+0x01
BBPWR
–
XOSCRDY
XOSCFAIL
BBBODF
BBPODF
Read/Write
R/W
R
R/W
Initial Value
0
x
0
Bit
7654
3210
+0x02
BACKUP0[7:0]
Read/Write
R/W
Initial Value
xxx
xxxx
x