116
XMEGA A [MANUAL]
8077I–AVR–11/2012
10.3.4 32-bit Real-time Counter
The 32-bit real-time counter (RTC) will count each clock output from the crystal oscillator. It provides a one-millisecond or
one-second resolution, depending on the crystal oscillator clock output selection. For more details on the 32-bit RTC,
10.3.5 Backup Registers
The two backup registers can be used to store volatile data parameters when Vcc is not present.
10.4
Configuration
During device initialization, the battery backup system and RTC must be configured before they can be used. The
recommended configuration sequence is:
1.
Apply a reset
2.
Set the access enable bit
3.
Optionally configure the oscillator output and ESR selection
4.
Optionally enable the crystal oscillator failure monitor and the required delay before continuing configuration
5.
Enable the crystal oscillator
6.
Wait until the crystal oscillator ready flag is set
7.
Configure and enable the RTC
10.5
Operation
The main BOD monitors the main voltage (Vcc) level and controls the power switching. This must always be enabled. In
active and idle modes, the BOD must be in continuos mode. In deep sleep modes, the BOD can be in continuos or
sampled mode. The system is designed as a power backup system for the RTC. Reset sources other than the BOD and
power loss (i.e. external reset, watchdog reset, and software reset) must be treated as a system reset. In this case, the
device state should be treated as unknown and lead to complete re-initialization, including battery backup system
configuration.
10.5.1 Main Power Loss
When Vcc drops below the programmed BOD threshold voltage, the device will:
1.
Switch the battery backup system to be powered from the VBAT pin and enable the BBBOD.
2.
Ignore any input signals to the system to prevent accidental or partial configuration.
3.
Stretch the 1Hz / 1.024kHz clock signal to avoid a clock edge when switching is active.
4.
Reset the part of the device not powered from the VBAT pin.
The battery backup system will continue to run as normal during the power switch and afterwards. When main power is
lost, it is not possible to access or read the status from the registers.
10.5.2 Main Power Restore and Start-up Sequence
At every startup after main power is restored, the software should:
1.
Control the main reset source to determine that a POR or BOD took place.
2.
Check for power on the VBAT pin by reading the BBPWR flag.
3.
Read the power supervisor flags to determine further software action:
If all power supervision flags are cleared, the battery backup system runs as normal. The software should
enable access to the battery backup system and check the crystal oscillator failure flag. If the flag is set, the
software should assume that the RTC counter value is invalid and take appropriate action.
If any power supervision flags are set, it indicates the battery backup system has lost power sometime
during the period when the rest of the device was unpowererd. Software should assume that the
configuration and RTC value are invalid and take appropriate action.
相关PDF资料
PIC18F4321T-I/ML IC PIC MCU FLASH 4KX16 44QFN
PIC18F4221T-I/ML IC PIC MCU FLASH 2KX16 44QFN
PIC18F2321T-I/ML IC PIC MCU FLASH 4KX16 28QFN
PIC18F2221T-I/SO IC PIC MCU FLASH 2KX16 28SOIC
PIC16LF1939-I/MV IC MCU 8BIT 28KB FLASH 40-UQFN
PIC24F16KL402-I/SP IC MCU 16BIT 16KB FLASH 28-SPDIP
PIC18F24J11-I/SS IC PIC MCU FLASH 16K 2V 28-SSOP
PIC24F16KA101-I/SO IC PIC MCU FLASH 16K 20-SOIC
相关代理商/技术参数
PIC18F4450T-I/PT 功能描述:8位微控制器 -MCU 16KB FL 768 RAM 34 I/O FS-USB 2.0 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC18F4455-BL 制造商:POWERLITE SYSTEMS 功能描述:PIC18F445 W/ BOOTLOADER FOR FLASHLAB 制造商:POWERLITE SYSTEMS 功能描述:PIC18F445 W/ BOOTLOADER, FOR FLASHLAB 制造商:POWERLITE SYSTEMS 功能描述:PIC18F445 W/ BOOTLOADER, FOR FLASHLAB; Silicon Manufacturer:Powerlite Systems; Core Architecture:PIC; Kit Contents:Board; Features:Bootloader Programming, RS232 Connector for Boot-Loading and Serial Comms ;RoHS Compliant: Yes
PIC18F4455-I/ML 功能描述:8位微控制器 -MCU 24kBF 2048RM FSUSB2 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC18F4455-I/P 功能描述:8位微控制器 -MCU 24kBF 2048RM FSUSB2 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC18F4455-I/PT 功能描述:8位微控制器 -MCU 24kBF 2048RM FSUSB2 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC18F4455T-I/ML 功能描述:8位微控制器 -MCU 24kBF 2048RM FSUSB2 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC18F4455T-I/PT 功能描述:8位微控制器 -MCU 24kBF 2048RM FSUSB2 RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC18F4458-I/ML 功能描述:8位微控制器 -MCU 24KB Flash 2KB RAM RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT