
MOTOROLA
Appendix E. MPC8240 Drivers
E-55
Epic_exception() finishes by restoring state and performs an RFI (return from interrupt)
back to the interrupted process.
E.4.9
Example Usage on Sandpoint Reference Platform
The EPIC driver source code currently defaults to a demonstration mode on the Sandpoint
Platform. The demo code is located in the epicInit() routine and allows for an interactive
demonstration of external interrupts. On Sandpoint X2, the external interrupts can be
manually demonstrated on IRQ lines 1 and 2 using the motherboard slide switches, S5 and
S6. However, these switches are not available on Sandpoint X3. The use of Global Timers
0 and 1, DMA0, and the Message Unit if in a Host/Agent setup are available on both
Sandpoint board versions. A debug mode is also provide and is controlled by the
-DEPICDBG compiler directive in the makefile located in the EPIC source directory. The
compiler directive allows the driver code to be much more verbose and informative when
exercising the EPIC unit features in the debug state.
Although manual interrupt demonstration is not available on Sandpoint X3, the platform
does implement serial interrupt logic making it very useful in testing serial interrupts using
EPIC.
E.4.9.1
Sandpoint X2 Reference Platform
The Sandpoint X2 Reference Platform provides a means to test external interrupts via two
slide switches (S5 and S6) located on the motherboard. Although these switches can be
manipulated to demo the EPIC unit, this is not the intended function of the switches. The
intended usage of these switches is described in the document titled, "Sandpoint PPMC
Processor PCI Mezzanine Card Host Board Technical Summary".
Switch S5 manipulates a 5V signal that originates from the interrupt output line of the
Winbond southbridge chip in the center of mother board. With S5 slid to the left, a 5V
signal is passed on, with S5 slid right, a 0V signal is passed on. The EPIC IRQ0-4 interrupt
lines can be configured to be active-low or active-high triggered.
Switch S6 specifies to which IRQ line (IRQ1 or IRQ 2) the interrupt signal from S5 is
passed. With the S6 slid right, IRQ1 is selected. With S6 slid left, IRQ2 is selected.
E.4.9.2
Initializing EPIC on Sandpoint X2
Initializing EPIC requires that DINK32 be running on a Sandpoint X2 system with an
MPC8240, MPC8245 or MPC107 PMC module. From the DINK32 command line,
initialize the EPIC unit by typing the EPIC initialization, “dev epic init” command.
DINK32 will respond with initialization messages and will be ready to handle external
interrupts. The user may now also manipulate the S5 and S6 switches to trigger interrupts
on the IRQ1 and IRQ2 lines on the Sandpoint X2. The Global Timers can now be
manipulated to generated timed interrupts. The Message Unit (I2O) can be used if in a
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.