AN2109 Freescale Semiconductor / Motorola, AN2109 Datasheet - Page 35

no-image

AN2109

Manufacturer Part Number
AN2109
Description
MPC555 Interrupts
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
7.3.3 Example 3: ISR Using Assembly and C
Summary: This example does the same SCI function as Example 2, but uses C for the interrupt handler
instead of assembler.
Operation: Operation is the same as in example 2, except that the SCI handler is in main.c instead of
exceptions.s file.
Stack Frame: Because the interrupt service routine calls a C function, more registers need to be saved
on the stack than in example 2. The stack frame used for this example is shown in
an unused entry in the stack. The EABI specification requires the stack to be 8-byte aligned, therefore
every stack frame should allocate the stack in increments of eight bytes).
Offset from SP
Freescale Semiconductor, Inc.
For More Information On This Product,
76
72
68
64
60
56
52
48
44
40
36
32
28
24
20
16
12
8
4
0
Table 20 Assembly and C Stack Frame
Rev. 0, 26 July 2001
MPC555 Interrupts
Go to: www.freescale.com
LR – IMPORTANT: Cannot save LR in prior
stack frame
Placeholder for LR of function to be called
Back chain (old SP)
unused (padding)
Register Saved
SRR1
SRR0
CTR
XER
R12
R11
R10
CR
R9
R8
R7
R6
R5
R4
R3
R0
Table
MOTOROLA
20. (There is
35

Related parts for AN2109