mcf51ac256a Freescale Semiconductor, Inc, mcf51ac256a Datasheet - Page 309

no-image

mcf51ac256a

Manufacturer Part Number
mcf51ac256a
Description
Mcf51ac Flexis
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mcf51ac256aCFGE
Manufacturer:
FREESCALE
Quantity:
2 400
Part Number:
mcf51ac256aCFGE
Manufacturer:
FREESCALE
Quantity:
2 400
Part Number:
mcf51ac256aCFUE
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mcf51ac256aCLKE
Manufacturer:
FREESCALE
Quantity:
1 500
Part Number:
mcf51ac256aCLKE
Manufacturer:
Freescale Semiconductor
Quantity:
10 000
Part Number:
mcf51ac256aCPUE
Manufacturer:
MURATA
Quantity:
1 000
13.6.3
As previously mentioned, the notion of a software IACK refers to the ability to query the interrupt
controller near the end of an interrupt service routine (after the current interrupt request has been cleared)
to determine if there are any pending (but currently masked) interrupt requests. If the response to the
software IACK’s byte operand read is non-zero, the service routine uses the value as the vector number of
the highest pending interrupt request and passes control to the appropriate new handler. This process
avoids the overhead of a context restore and RTE instruction execution, followed immediately by another
interrupt exception and context save. In system environments with high rates of interrupt activity, this
mechanism can improve overall system performance noticeably.
To illustrate this concept, consider the following ISR code snippet shown in
This snippet includes the prologue and epilogue for an interrupt service routine as well as code needed to
perform software IACK.
At the entry point (
stack to save the four volatile registers (d0, d1, a0, a1) defined in the ColdFire application binary interface.
After saving these registers, the ISR continues at the alternate entry point.
The software IACK is performed near the end of the ISR, after the source of the current interrupt request
is negated. First, the appropriate memory-mapped byte location in the interrupt controller is read
(PC = 0x5C0). The CF1_INTC module returns the vector number of the highest priority pending request.
If no request is pending, zero is returned. The compare instruction is needed to manage a special case
involving pending level seven requests. Because the level seven requests are non-maskable, the ISR is
interrupted to service one of these requests. To avoid any race conditions, this check ignores the level seven
vector numbers. The result is the conditional branch (PC = 0x5C8) is taken if there are no pending requests
or if the pending request is a level seven.
Freescale Semiconductor
00588: 4fef fff0 lea
0058c: 48d7 0303 movem.l #0x0303,(sp)
00590:
005c0: 71b8 ffe0 mvz.b
005c4: 0c00 0041 cmpi.b
005c8: 6f0a
005ca: 91c8
005cc: 2270 0c00 move.l
005d0: 4ee9 0008 jmp
005d4: 4cd7 0303 movem.l (sp),#0x0303
005d8: 4fef 0010 lea
005dc: 4e73
....
More on Software IACKs
irqxx_entry
MCF51AC256 ColdFire Integrated Microcontroller Reference Manual, Rev. 5
align
irqxx_entry:
irqxx_alternate_entry:
irqxx_swiack:
ble.b
sub.l
align
irqxx_exit:
rte
-16(sp),sp
INTC_SWIACK.w,d0
#0x41,d0
irqxx_exit
a0,a0
0(a0,d0.l*4),a1
8(a1)
4
16(sp),sp
4
Figure 13-7. ISR Code Snippet with SWIACK
), there is a two-instruction prologue to allocate space on the supervisor
# allocate stack space
# save d0/d1/a0/a1 on stack
# perform software IACK
# pending IRQ or level 7?
# no pending IRQ, then exit
# clear a0
# fetch pointer from xcpt table
# goto alternate isr entry point
# restore d0/d1/a0/a1
# deallocate stack space
# return from handler
Figure
Interrupt Controller (CF1_INTC)
13-7.
13-19

Related parts for mcf51ac256a