English
Language : 

MC9S12P128_10 Datasheet, PDF (249/566 Pages) Freescale Semiconductor, Inc – S12 Microcontrollers
7.6.1
S12 Clock, Reset and Power Management Unit (S12CPMU)
Description of Interrupt Operation
7.6.1.1 Real Time Interrupt (RTI)
The clock source for the RTI is either IRCCLK or OSCCLK depending on the setting of the RTIOSCSEL
bit. In Stop Mode with PSTP=1 (Pseudo Stop Mode), RTIOSCSEL=1 and PRE=1 the RTI continues to
run, else the RTI counter halts in Stop Mode.
The RTI can be used to generate hardware interrupts at a fixed periodic rate. If enabled (by setting
RTIE=1), this interrupt will occur at the rate selected by the CPMURTI register. At the end of the RTI
time-out period the RTIF flag is set to one and a new RTI time-out period starts immediately.
A write to the CPMURTI register restarts the RTI time-out period.
7.6.1.2 PLL Lock Interrupt
The S12CPMU generates a PLL Lock interrupt when the lock condition (LOCK status bit) of the PLL
changes, either from a locked state to an unlocked state or vice versa. Lock interrupts are locally disabled
by setting the LOCKIE bit to zero. The PLL Lock interrupt flag (LOCKIF) is set to 1 when the lock
condition has changed, and is cleared to 0 by writing a 1 to the LOCKIF bit.
7.6.1.3 Oscillator Status Interrupt
The Oscillator Filter contains two different features:
1. Filter spikes of the external oscillator clock.
2. Qualify the external oscillator clock.
When the OSCE bit is 0, then UPOSC stays 0. When OSCE=1 and OSCFILT = 0, then the filter is
transparent and no spikes are filtered. The UPOSC bit is then set after the LOCK bit is set.
Upon detection of a status change (UPOSC), that is an unqualified oscillation becomes qualified or vice
versa, the OSCIF flag is set. Going into Full Stop Mode or disabling the oscillator can also cause a status
change of UPOSC.
Also, since the oscillator filter is based on the PLLCLK, any change in PLL configuration or any other
event which causes the PLL lock status to be cleared leads to a loss of the oscillator status information as
well (UPOSC=0).
Oscillator status change interrupts are locally enabled with the OSCIE bit.
NOTE
loosing the oscillator status (UPOSC=0) affects the clock configuration of
the system1. This needs to be dealt with in application software.
1. For details please refer to “7.4.6 System Clock Configurations”
S12P-Family Reference Manual, Rev. 1.13
Freescale Semiconductor
249