AN2109 Freescale Semiconductor / Motorola, AN2109 Datasheet - Page 25

no-image

AN2109

Manufacturer Part Number
AN2109
Description
MPC555 Interrupts
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
7 Examples of Initialization and Interrupt Service Routines
7.1 Example Interrupt Service Routines (ISRs):
7.2 Files Used for Examples
The following examples illustrate different techniques of handling interrupt exceptions. They have been
tested on a MPC555 evaluation board with a debugger. Code was compiled using the Diab Compiler
Version 4.3G. Examples 2 through 5 were tested using a standard personal computer terminal program
with settings of 9600 baud, 8 data bits, no parity, 2 stop bits and no flow control. If running these pro-
grams, a standard serial cable is requried, and possibly a null modem adapter.
Initialization comments: Interrupt initialization, such is in the “initPIT” function in the first example or
“initSci” function in other examples, is written for illustration, not to optimize code.
Processor initialization, done in the function “init555”, is minimal for these examples. Common items
to initialize are:
The files in
1. SYPCR: disable watchdog timer
2. SIUMCR: disable data show cycles
3. PLPRCR: increase clock frequency using MF bit field and optionally wait for PLL to lock
4. UMCR: set UIMB bus to full speed using HSPEED bit
5. SPR560 (BBCMCR): enable burst buffer
6. SPR158 (ICTRL): Increase processing speed by taking processor out of serialized mode
1. Absolute minimum interrupt routine – PIT
2. ISR using assembly language only
3. ISR using assembly and C
4. ISR using C only – one interrupt source
5. ISR using C only – general case
6. ISR with nested interrupt capability (conceptual example)
Table 17
exceptions.s
File Name
makefile
link file
main.c
are used in the examples, except where noted.
Freescale Semiconductor, Inc.
For More Information On This Product,
Varies for each example, but always initializes the CPU and interrupt
device and waits in a loop
Interrupt Service Routine which calls an interrupt handler written in C
or assembler. File is not used in C only examples
Common for all examples other than changing the EXECUTABLE
name and sometimes removing exception.s file from the objects list.
Common for all examples
Rev. 0, 26 July 2001
MPC555 Interrupts
Go to: www.freescale.com
Table 17 Example Files
Description
MOTOROLA
25

Related parts for AN2109