beautypg.com

5 using the ring oscillator, Clock source selection, Table 7-e – Maxim Integrated High-Speed Microcontroller User Manual

Page 100

background image

High-Speed Microcontroller User’s Guide

Rev: 062210

100 of 176

Table 7-E. Clock Control and Status Bit Summary

BIT

LOCATION

FUNCTION

RESET

WRITE ACCESS

XT/ RG

EXIF

.3

Crystal/Ring Clock Source Select. This bit is not present on
the DS80C320.
1 = Select crystal or external clock as clock source.
0 = Select ring oscillator as clock source

1

0 anytime; 1

when XTUP = 1

and XTOFF = 0

RGMD

EXIF

.2

Ring Oscillator Mode Status
1 = Ring oscillator is current clock source.
0 = Crystal or external clock is current clock source.

0 None

RGSL

EXIF

.1

Ring Oscillator Select, Stop Mode
1 = Ring oscillator will be the clock source when resuming
from Stop mode.
0 = Crystal or external clock will be the clock source when
resuming from Stop mode.
Note: Upon completion of crystal warmup period,
DS80C320 devices will switch to crystal. DS87C520 and
DS87C530 devices will switch to clock source designated
by XT/RG bit.

Unrestricted

XTOFF

PMR

.3

Crystal Oscillator Disable. Disables crystal operation after
ring mode has been selected. This bit is not present on the
DS80C320.
1 = Crystal amplifier is disabled.
0 = Crystal amplifier is enabled. Check XTUP for status.

0

0 anytime; 1 when

XT/ RG = 0

XTUP

STATUS

.4

Crystal Oscillator Warmup Status. This bit is not present on
the DS80C320.
1 = Oscillator warmup complete.
0 = Oscillator warmup still in progress, crystal not
available.

1 None

7.3.5 Using the Ring Oscillator

The ring oscillator is an internal 2MHz–4MHz clock source used to quickly exit Stop mode and resume
operation without waiting for an external clock source to stabilize. Some devices feature the additional
capability of using the ring oscillator as the primary clock source during normal operation, once the
device has performed an initial power-on reset using an external clock source. Because the ring oscillator
lacks the stability of a piezoelectric-generated clock source, high-precision timing operations should be
avoided while running from the ring oscillator. This includes using the timers for pulse measurement, and
the use of the serial ports in asynchronous modes. Serial ports operating in mode 0 are unaffected by the
stability of the clock source because this mode utilizes a synchronizing clock.

If the ring oscillator select bit, RGSL (

EXIF

.1) is set, the device will resume operation immediately using

the internal ring oscillator as the clock source. The device will continue to run from the ring oscillator
until the crystal warmup period of 65,536 clock cycles (measured from the external source) has
completed. At this time the device will switch to the clock source active before it entered Stop mode and
continue operation. This allows software execution to begin immediately upon resuming from Stop mode.
The ring oscillator mode bit, RGMD (

EXIF

.2), indicates the current clock source. In Stop mode, enabled

interrupts become true edge triggered interrupts, compared with the sampled edge detection used during
normal operation. This means that external interrupts are more sensitive to noise in Stop mode than
during normal operation. Applications should be carefully designed to ensure that noise will not cause an
erroneous exit from Stop mode.