8.1 Introduction
The Real Time Clock (RTC) is a feature that can keep counting the time using external back-up battery when main system power-off. In this design a 32-bits counter is implemented for second counting. The conversion from second to time and date is calculated by software.
This design also provides an alarm feature that can be used to allow main system to 'wake up' after shut down to execute tasks in a certain moment. The alarm setting in seconds, the conversion from time and date to second is calculated by software.
Back-up power source can used a Super Cap or a coin battery (like CR2032), and build-in charging circuit without any external component.
The control registers locate at RGST Table Group116 registers which memory map address are 0x9C003A00~0x9C003A7F. The SP7021 RTC function include below features.
...
Field Name | Bit | Access | Description |
Bit Write Mask | 31:16 | RW | |
Reserved | 15:4 | RO | |
bat_charge_rsel | 3:2 | RW | Choose charge resistor path 2'b00: 200 Ohm resistor path (default) |
bat_charge_dsel | 1 | RW | Choose the path with / without diode 0: without with diode (default) |
bat_charge_en | 0 | RW | Battery charger 0: disable (default) 1: enable |
...