Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

78.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.

  • Sustain more than one year with 250ma-H battery.
  • RTC with alarm timer module has its own interrupt signal internally . 
  • Backup power failure flag (Group116.16 bit9 bat_pg_o & bit8 supply_PG_o) to indicate the RTC information is not reliable when V-battery is lower than safe voltage. User can read the flag to monitor battery status.

...


8.2 Function Diagram

A generalized function diagram of RTC is shown in Figure 78-1.

Figure 78-1 RTC Functional Blocks
RTC operates in two modes that are normal and back-up mode.
In the normal mode, when system power on, the power supply is come from VDD33. System can get current time from REG-bus and can set alarm time by REG-bus.
In the back-up mode, when system power off, the backup domain power supply by supper CAP or battery. The main system can be wake up when alarm alert.

Anchor
_GoBack
_GoBack

...

8.3 Battery Charge Control

The bat_charge_en bit set 1 can enable battery charger, this function default is disable. There have charge resistor and protect diode circuits in this block. The bat_charge_rsel bits can choose charge resistor value and bat_charge_dsel bit can choose the path with or without diode.
The control register is Group 116.23 rtc_batt_charge_ctrl.

...

8.4 RTC Alarm Operation

Set alarm_en_overdue bit to 1 can enable alarm function. System can get current time from Group 116.17 rtc_timer_out register. Set alarm_en bit to 1 can enable alarm for system function. System can set alarm time from Group 116.19 rtc_timer_set register. The timer count value output at 1Hz to digital. The control register is Group 116.16 rtc_ctrl.

...




8.5 Registers Map

...

8.5.1 Registers Memory Map

Address

Group No.

Register Name

Description

0x9C003A00

G116.0

Reserved

Reserved

0x9C003A04

G116.1

Reserved

Reserved

0x9C003A08

G116.2

Reserved

Reserved

0x9C003A0C

G116.3

Reserved

Reserved

0x9C003A10

G116.4

Reserved

Reserved

0x9C003A14

G116.5

Reserved

Reserved

0x9C003A18

G116.6

Reserved

Reserved

0x9C003A1C

G116.7

Reserved

Reserved

0x9C003A20

G116.8

Reserved

Reserved

0x9C003A24

G116.9

Reserved

Reserved

0x9C003A28

G116.10

Reserved

Reserved

0x9C003A2C

G116.11

Reserved

Reserved

0x9C003A30

G116.12

Reserved

Reserved

0x9C003A34

G116.13

Reserved

Reserved

0x9C003A38

G116.14

Reserved

Reserved

0x9C003A3C

G116.15

Reserved

Reserved

0x9C003A40

G116.16

rtc ctrl

RTC Control

0x9C003A44

G116.17

rtc timer out

Get Timer

0x9C003A48

G116.18

rtc divider cnt  out

Get Divider Cnt

0x9C003A4C

G116.19

rtc timer set

Set Timer

0x9C003A50

G116.20

rtc alarm  set

Set Alarm

0x9C003A54

G116.21

rtc user  data

User Data Keep

0x9C003A58

G116.22

rtc reset record

Get Reset Records

0x9C003A5C

G116.23

rtc batt charge  ctrl

Battery Charge Control

0x9C003A60

G116.24

Reserved

Reserved

0x9C003A64

G116.25

Reserved

Reserved

0x9C003A68

G116.26

Reserved

Reserved

0x9C003A6C

G116.27

Reserved

Reserved

0x9C003A70

G116.28

Reserved

Reserved

0x9C003A74

G116.29

Reserved

Reserved

0x9C003A78

G116.30

Reserved

Reserved

0x9C003A7C

G116.31

rtc ip version

IP Version

...

8.5.1 Registers Description

RGST Table Group 116 RTC

116.0 Reserved (Reserved)
Address: 0x9C003A00
Reset: 0x0000 0000

...