MPC563XM Reference Manual, Rev. 1
432
Freescale Semiconductor
Preliminary—Subject to Change Without Notice
14.6.4.1
Additional Software Setable Interrupt Requests
The addresses IN0x28 through IN0x3C are reserved for 24 more Software
Set/Clear Interrupt Registers.
14.7
Initialization/Application Information
14.7.1
Initialization Flow
After exiting reset, all of the PRI
x
and PRC_SEL
x
fields in
Section 14.5.11, “INTC Priority Select
Registers (INTC_PSR0_3 - INTC_PSR508_511)
” will be zero, and PRI in both
Current Priority Register for Processor 0 (INTC_CPR_PRC0)
Priority Register for Processor 1 (INTC_CPR_PRC1)
” will be 15. These reset values will prevent the
INTC from asserting the interrupt request to the processors. Furthermore, the Indigo-Line section of the
IPI specification states that the peripherals must have a bit to enable or mask peripheral interrupt request
signals. An initialization sequence for allowing the peripheral and software setable interrupt requests to
cause an interrupt request to the processor is:
interrupt_request_initialization:
configure VTES_PRC0,VTES_PRC1,HVEN_PRC0 and HVEN_PRC1 in INTC_BCR
configure VTBA_PRC
x
in INTC_IACKR_PRC
x
raise the PRI
x
fields and set the PRC_SEL
x
fields to the desired processor in INTC_PSR
x
_
x
set the enable bits or clear the mask bits for the peripheral interrupt requests
lower PRI in INTC_CPR_PRC
x
to zero
enable processor(s) recognition of interrupts
14.7.2
Interrupt Exception Handler
These example interrupt exception handlers use Power Architecture assembly code.
14.7.2.1
Software Vector Mode
interrupt_exception_handler:
code to save SRR0 and SRR1
lis
r3,hi(INTC_IACKR_PRC
x
)
# form INTC_IACKR_PRC
x
address
ori
r3,r3,lo(INTC_IACKR_PRC
x
)
lwz
r3,0x0(r3)
# load INTC_IACKR_PRC
x
, which clears request to processor
lwz
r3,0x0(r3)
# load address of ISR from vector table
code to enable processor recognition of interrupts and save context required by EABI
mtlr
r3
# move INTC_IACKR_PRC
x
contents into link register
blrl
# branch to ISR; link register updated with epilog
# address
epilog:
lis
r3,hi(INTC_EOIR_PRC
x
)
# form INTC_EOIR_PRC0 address
ori
r3,r3,lo(INTC_EOIR_PRC
x
)
li
r4,0x0
# form 0 to write to INTC_EOIR_PRC
x
stw
r4,0x0(r3)
# store to INTC_EOIR_PRC
x
, informing INTC to lower priority