Real time clock with software trim, 1 introduction, 1 software trim – Cirrus Logic EP93xx User Manual

Page 649: Chapter 20. real time clock with software trim -1, 1 introduction -1, 1 software trim -1, Chapter 20, Real time clock, With software trim, Real time

Advertising
background image

DS785UM1

20-1

Copyright 2007 Cirrus Logic

2

0

2

0

20

Chapter 20

20

Real Time Clock With Software Trim

20.1 Introduction

The Real Time Clock (RTC) is a circuit that keeps track of the system date and time. The
RTC operates from the normal device power supply and the 32 kHz input clock. The RTC
circuit operates whenever power is applied to the device and the 32 kHz input clock is
running.

The Real Time Clock section is composed of two blocks - Real Time Clock and the RTC
TRIM.

The RTC module provides second level precision for internal time keeping. In addition, the
block provides an interrupt based on a comparison register. The Real Time Clock block
operates whenever power is applied and the 32 kHz input clock is running. However, the RTC
cannot be used to wake the system via its interrupt when the system is in a STANDBY or
HALT state, where PCLK is inactive.

The RTC TRIM block takes the 32,768 Hz clock from the RTC oscillator and creates a
digitally compensated 1 Hz reference clock for use by the time keeping functions.

Note: The 32,768 Hz clock is referred to as the 32 kHz clock throughout the text.

20.1.1 Software Trim

The Real Time Clock oscillator software compensation circuitry allows software controlled
digital compensation of a 32.768 kHz crystal oscillator. Typically, crystal oscillators must be
externally compensated using discrete components. They are mechanically calibrated during
manufacture. Software controlled digital compensation allows the oscillator to be
electronically calibrated by automatic test equipment during manufacture. The circuit also
enables readjustment in the field under software control.

The RTCSWComp register value is determined by manufacturing during board initialization
to adjust the frequency of the 1 Hz clock. Refer to

Section 20.1.1.1

for details on how to

calculate the value in this register. This value is then stored in FLASH memory for retrieval
when the product is first enabled in the field. The compensation values need to be restored
once the RTC is permanently enabled for field use.

The compensation value consists of two parts: a counter preload value to act as an integer
divider, (RTCSWComp.INT[15:0]), and the number of 32.768 kHz clocks to delete on a
periodic interval (RTCSWComp.DEL[4:0]).

Advertising