
Technical Bulletin 1
LH75400/01/10/11
Technical Bulletin System-on-Chip
PURPOSE
This document is a supplement to Product Change
Information containing Errata for some early SHARP
LH75400/01/10/11 series of System-on-Chip parts.
When the Errata have been corrected, the information
in this Technical Bulletin will no longer apply. These
parts may have a suseptibility to ground noise in the the
Real-Time Clock (32.768 KHz) oscillator. They there-
fore may require a software work around for the Real-
Time Clock (RTC), if the RTC was to be used as a time-
of-day clock.
This Technical Bulletin will use one of the chip’s tim-
ers to allow an application to keep track of the elapsed
time in seconds or to generate an interrupt when the
elapsed time matches a preset value in spite of these
difficulties. These methods will work with any revision of
the silicon, so the software will not need to be changed.
INTRODUCTION
If your application does not require the features that
the RTC provides, then this Technical Bulletin does not
apply to you, and you may saf ely ground the RTC crys-
tal input pin. If your application is always running in
Active or Standby mode, see the Active or Standby
mode section. If your application enters any other Low
Power mode, see th e Low Power Operation section.
The 32.768 kHz oscillator has a susceptibility to
ground noise induced by the on-chip System Clock
(HCLK) and Phase-Locked Loop (PLL). The suscepti-
bility manifests as extra pulses on the oscillator’s out-
put. If the SoC is in Active, Standby, or Sleep mode,
then the RTC Data Regist er 0 and RTC Data Register 1
will increment at too high a rate. How fast the clock
appears to run dep ends on the quality of the clock crys-
tal, the passive components, and the attention paid to
the circuit board layout.
As a consequence, if the RTC is used as a time-of-
day clock, the clock will run too fast.
The RTC is not recommended for use in the Sleep
or Stop1 modes.
ACTIVE OR STANDBY MODE
Unfortunately, in Active Mode and Standby Mode,
the LH75400/01/10/11 PLL and HCLK are always
active and therefore always producing the noise that
will corrupt the RTC. You should not use the RTC if
your application only uses Active or Standby Mode.
This part of the work around assumes that your appli-
cation has these properties:
• The application requires a way to track the elapsed
time in seconds (e.g., the time-of-day), and/or it
needs to generate an interrupt when the elapsed
time matches a pre-determined elaspsed time.
• The application is running an operating system that
supports software timers, or the application is not
using all three timers that are clocked using HCLK
(Timer 0, Timer 1, an d Timer 2) , or the applica tion is
using Timer 0, Timer 1, or Timer 2 to generate a peri-
odic waveform or periodi c interrupt.
• The application never sto ps the timer that is generat-
ing the operating system clock, or in a non-operat ing
system application, the application never stops the
timer that is generating a periodic waveform or peri-
odic interrupt.
Software Algorithm
Declare a 32-bit glo bal variable tha t your application
will use to keep track of the elapsed time in seconds:
rtc_elapsed_time;// UNS_32: 32-bit unsigned type
Initialize the 32-bit global variable with the same
value you would have used to initialize the RTC load
register.
If your application requires the same feature pro-
vided by the RTC match register, (i.e., Match Register
0 and Match Register 1), declare a second 32-bit global
variable to store the match value:
UNS_32 rtc_match;
If your application uses an operating system with a
timer facility, use that facility to increment the 32-bit glo-
bal variable every second. For example, set up a high
priority task that wakes every second, increments the
variable, and then suspends.
For lower overhead if your application's operating
system provides hooks to the timer interrupt, or if your
application doesn't have an operating system, program
your application's periodic timer interrupt to increment
your elapse d time global v ariable after th e appr opriat e
number of timer interrupts have occurred.
If you require the interval match facility, use the soft-
Creating a Real-Time Clock (RTC) with an On-chip Timer and Software
Paul Kovitz, Staff Engineer