Figure 5-7. external crystal-fail detection -17 – Maxim Integrated MAXQ7666 User Manual

Page 214

Advertising
background image

5.3.5 External Crystal-Fail Detection and Automatic Switchover

The MAXQ7665/MAXQ7666 have a high-frequency oscillator-fail detection circuit. An automatic clock switchover from crystal to
7.6MHz RC oscillator is forced if:

• XT = 1 (external crystal is selected as the system clock source).

• XHFRY = 1 (high-frequency oscillator warmup is complete).

• A clock failure (high-frequency source drops below 30kHz) is detected.

When the above condition has been detected, the clock circuitry will:

• Enable the internal 7.6MHz RC oscillator immediately (RCE forced to 1).

• Switch the system clock source from external to internal (XT forced to 0).

• Set the high-frequency crystal failure interrupt flag to 1 (HFFINT = 1).

The 7.6MHz RC oscillator system clock should be ready after a four-cycle delay. This switchover remains in effect until software recon-
figures the clock structure. A crystal failure interrupt is generated if the high-frequency oscillator failure interrupt is enabled (HFFIE =
1). Also, for the interrupt to be acknowledged by the microcontroller interrupt logic, the interrupt request must also be enabled by the
IGE bit in the IC register and IM5 mask in the IMR peripheral register. Figure 5-7 illustrates the external crystal-fail detection and auto-
matic clock switchover flow.

EXTERNAL CRYSTAL FAIL

DETECTION AND AUTOMATIC SWITCHOVER

YES

*NOTE: TRIGGERED WHEN THE HIGH-FREQUENCY
OSCILLATOR DROPS BELOW 30kHz.

**NOTE: INTERRUPT IS GENERATED IF HFFIE, IGE,
AND IM5 ARE SET TO LOGIC 1.

DONE

HIGH-FREQ OSCILLATOR

SELECTED AND STABLE

(XT = 1, XHFRY = 1)

AUTOMATIC SWITCH TO

INTERNAL RC OSCILLATOR

(RCE = 1, XT = 0)

SET HIGH-FREQ FAILURE FLAG

(HFFINT = 1)**

HF OSCILLATOR

FAIL? *

(XHFRY = 0)

NO

Figure 5-7. External Crystal-Fail Detection

MAXQ7665/MAXQ7666 User’s Guide

5-17

Maxim Integrated

Advertising
This manual is related to the following products: