
33-2
Device Drivers
Programmer’s Manual
refer to Chapter 15 - Interrupt Handlingand Chapter 29 - Interrupt Handling
Tools for details on interrupt handling.
Please refer to the
MC68328 Integrated Processor User’s Manual,
MC68328UM/AD
, for details on the interrupt controller.
A single argument is passed into the interrupt handler. This argument is
supplied by PPSM system to specify the address of the stack pointer just
before calling the user-defined interrupt handler.
Table 31-1
shows the
locations of the registers relative to this stack address.
M68328ADS implementation:
These interrupt handlers perform no operation and return to the interrupted
application immediately.
In general, _UARTIrptHandler() will not be executed. For PPSM source
licensee, a "-DNO_UART_HANDLER" option can be used in compiler oFor M68EZ328ADS, the pen input device driver is similar as above, but it uses
to indicate that the internal UART interrupt handler is not used and port D and E instead of port J in M68328ADS.
_UARTIrptHandler() is used instead.
Table 31-1 Interrupt Stack Layout
D0 - D7
A0 - A6
CS
PC
Argument is the address that points to here ->
SR (16-bit)
The following functions are the user defined interrupt handlers:
void _SPIMIrptHandler(P_U32 stackPtr)
SPI Master
void _SPISIrptHandler(P_U32 stackPtr)
SPI Slave(not available in
EZ)
void _IRQ6IrptHandler(P_U32 stackPtr)
IRQ6
void _UARTIrptHandler(P_U32 stackPtr)
UART
void _WatchdogIrptHandler(P_U32 stackPtr)
Watch Dog Timer
void _KeyboardIrptHandler(P_U32 stackPtr)
Keyboard
void _PWMIrptHandler(P_U32 stackPtr)
Pulse Width Modulator
void _INTIrptHandler(P_U32 stackPtr)
INT0-INT7
void _IRQ3IrptHandler(P_U32 stackPtr)
IRQ3
void _IRQ2IrptHandler(P_U32 stackPtr)
IRQ2
void _IRQ1IrptHandler(P_U32 stackPtr)
IRQ1
Personal Portable System Manager
Programmer’s Manual
Device Drivers
33-3
Figure 31-1 shows the configuration of the hardware used in M68328ADS for the
pen input device:
4 I/O pins on port J, PJ0 to PJ3, are used to control the transistor
network.
I/O pin 7 on port J, PJ7, is used to control the chip-select on the A/
D convertor.
The SPI Master RxD line is connected to the A/D convertor’s digital
output for the sample result.
Please refer to the M68328ADS User’s Manual
for details on the operation of the
hardware configuration.
There are 4 functions in this driver:
Pen Initialization
Pen Interrupt Enable
Pen Interrupt Disable
Pen Read Device
Q6
Q3
Q4
Q5
PJ0
PJ2
PJ1
PJ3
AN0
Vcc
Vcc
PJ7
SPIMRxD
Figure 31-1 Transistor network for pen sampling
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.