English
Language : 

MC68HC908QB8 Datasheet, PDF (52/236 Pages) Freescale Semiconductor, Inc – To provide the most up-to-date information, the revision of our documents
Auto Wakeup Module (AWU)
4.3 Functional Description
The function of the auto wakeup logic is to generate periodic wakeup requests to bring the microcontroller
unit (MCU) out of stop mode. The wakeup requests are treated as regular keyboard interrupt requests,
with the difference that instead of a pin, the interrupt signal is generated by an internal logic.
Writing the AWUIE bit in the keyboard interrupt enable register enables or disables the auto wakeup
interrupt input (see Figure 4-1). A 1 applied to the AWUIREQ input with auto wakeup interrupt request
enabled, latches an auto wakeup interrupt request.
Auto wakeup latch, AWUL, can be read directly from the bit 6 position of port A data register (PTA). This
is a read-only bit which is occupying an empty bit position on PTA. No PTA associated registers, such as
PTA6 data direction or PTA6 pullup exist for this bit.
There exists two clock sources for the AWU. An internal RC oscillator (exclusive for the auto wakeup
feature, AWU oscillator) drives the wakeup request generator provided the OSCENINSTOP bit in the
CONFIG2 register Figure 4-1is cleared. If the application employs a crystal, for example, by setting the
OSCENINSTOP bit the BUSCLKX4 will drive the wakeup request generator to allow a more accurate
wakeup.
Entering stop mode will enable the auto wakeup generation logic.
Once the overflow count is reached in the generator counter, a wakeup request, AWUIREQ, is latched
and sent to the KBI logic. See Figure 4-1.
Wakeup interrupt requests will only be serviced if the associated interrupt enable bit, AWUIE, in KBIER
is set. The AWU shares the keyboard interrupt vector.
The overflow count can be selected from two options defined by the COPRS bit in CONFIG1. This bit was
“borrowed” from the computer operating properly (COP) using the fact that the COP feature is idle (no
MCU clock available) in stop mode.
The auto wakeup RC oscillator is highly dependent on operating voltage and temperature. This feature is
not recommended for use as a time-keeping function.
The wakeup request is latched to allow the interrupt source identification. The latched value, AWUL, can
be read directly from the bit 6 position of PTA data register. This is a read-only bit which is occupying an
empty bit position on PTA. No PTA associated registers, such as PTA6 data, PTA6 direction, and PTA6
pullup exist for this bit. The latch can be cleared by writing to the ACKK bit in the KBSCR register. Reset
also clears the latch. AWUIE bit in KBI interrupt enable register (see Figure 4-1) has no effect on AWUL
reading.
The AWU oscillator and counters are inactive in normal operating mode and become active only upon
entering stop mode.
4.4 Interrupts
The AWU can generate an interrupt requests:.
AWU Latch (AWUL) — The AWUL bit is set when the AWU counter overflows. The auto wakeup interrupt
mask bit, AWUIE, is used to enable or disable AWU interrupt requests.
The AWU shares its interrupt with the KBI vector.
MC68HC908QB8 Data Sheet, Rev. 1
52
Freescale Semiconductor