MOTOROLA
Chapter 12. Embedded Programmable Interrupt Controller (EPIC)
12-11
EPIC Serial Interrupt Interface
12.6.1 Sampling of Serial Interrupts
When the EPIC unit is programmed for serial interrupts, 16 sources are sampled through
the S_INT input signal. Each source (0D15) is allocated a one-cycle time slot in a sequence
of 16 cycles in which to request an interrupt. The serial interrupt interface is clocked by the
EPIC S_CLK output. This clock can be programmed to run at 1/2 to 1/14 of the MPC8240s
SDRAM_CLK frequency by appropriately setting a 3-bit Teld in the serial interrupt
conTguration register. See Section 12.9.3, òEPIC Interrupt ConTguration Register
(EICR).ó Extreme care should be used with regard to board noise problems if a frequency
above 33 MHz is chosen. All references to the clock and to cycles in this subsection refer
to the S_CLK clock.
When EPIC is switched to serial mode by setting EICR[SIE] = 1, a 16-cycle sequence
begins 4 S_CLK cycles after EPIC outputs a 2-cycle high pulse through the S_RST output
signal. The 16-cycle sequence keeps repeating; after going from interrupt source cycle
count of 0, 1, 2, 3, 4, ... 15, the count immediately returns to 0, 1, 2, etc., with no S_CLK
delays between cycle count 15 and the next cycle count 0. Each time the sequence count is
pointing to interrupt source 0, the S_FRAME signal is active. S_FRAME is provided to
guarantee synchronization between the MPC8240 EPIC unit and the serial interrupt source
device.
Note that initially, interrupt source 0 is sampled at the Tfth S_CLK rising edge after S_RST
negates. Also, once S_RST is asserted, it is not asserted again until after an EPIC reset, and
the EPIC unit is subsequently programmed to serial mode again.
12.6.2 Edge/Level Sensitivity of Serial Interrupts
The interrupt detection is individually programmable for each source to be edge- or level-
sensitive by writing the sense and polarity bits of the vector/priority register of the
particular interrupt source. Refer to Section 12.3.6.1, òInterrupt Pending Register (IPR)
Non-programmable,ó and the serial vector/priority register description in Section 12.9.8.1,
òDirect & Serial Interrupt Vector/Priority Regs (IVPRs, SVPRs),ó for more edge/level
sensitivity information.
Note that for level-sensitive interrupts there is a potential race condition between an EOI
(end of interrupt) command for a speciTc interrupt source; and the sampling of the same
speciTc interrupt source as inactive. Level-sensitive interrupts are cleared from an IPR only
when sampled as inactive; therefore, a second interrupt for the same source may occur,
although the speciTc interrupt has already been serviced.
Software can avoid this second interrupt by delaying the EOI command to the EPIC unit.
Depending on the interrupt source device being serviced, one possible software method is
to Trst clear the interrupt from the source before executing any other necessary read or write
transactions to service the interrupt device. In any case, the delay should be no less than 16
serial clocks after clearing the interrupt at the source device.