Freescale Semiconductor MCF51QE128RM Intc Software and Level-nIACK Registers n = 1,2,3,...,7

Models: MCF51QE128RM

1 424
Download 424 pages 63.71 Kb
Page 184
Image 184

Chapter 8 Interrupt Controller (CF1_INTC)

8.3.2.6INTC Software and Level-nIACK Registers (n = 1,2,3,...,7)

The eight read-only interrupt acknowledge (IACK) registers can be explicitly addressed via memory-mapped accesses or implicitly addressed via a processor-generated interrupt acknowledge cycle during exception processing when CPUCR[IAE] is set. In either case, the interrupt controller's actions are very similar.

First, consider an IACK cycle to a specific level, a level-n IACK. When this type of IACK arrives in the interrupt controller, the controller examines all currently-active level-n interrupt requests, determines the highest priority within the level, and then responds with the unique vector number corresponding to that specific interrupt source. The vector number is supplied as the data for the byte-sized IACK read cycle.

If there is no active interrupt source at the time of the level-nIACK, a special spurious interrupt vector (vector number 24 (0x18)) is returned. It is the responsibility of the service routine to manage this error situation.

This protocol implies the interrupting peripheral is not accessed during the acknowledge cycle because the interrupt controller completely services the acknowledge. This means the interrupt source must be explicitly disabled in the peripheral device by the interrupt service routine. This approach provides unique vector capability for all interrupt requests, regardless of the complexity of the peripheral device.

Second, the interrupt controller also supports the concept of a software IACK. This is the ability to query the interrupt controller near the end of an interrupt service routine (after the current interrupt request has been negated) 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 returned value as the vector number of the highest pending interrupt request and passes control to the appropriate new handler. If the returned value is zero, there is no pending interrupt request.

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 noticeably improve overall performance. For additional details on software IACKs, see Section 8.6.3, “More on Software IACKs.”

Offset: CF1_INTC_BASE + 0x20 (INTC_SWIACK) CF1_INTC_BASE + 0x20 + (4n) (INTC_LVLnIACK)

7

6

5

4

Access: Read-only

3

2

1

0

R

W

0

VECN

SWIACK

0

0

0

0

Reset

 

 

 

 

LVLnIACK

0

0

0

1

Reset

 

 

 

 

0

0

0

0

1

0

0

0

Figure 8-7. INTC_SWIACK, INTC_LVLnIACK Registers

MCF51QE128 MCU Series Reference Manual, Rev. 3

184

Freescale Semiconductor

Get the latest version from freescale.com

Page 184
Image 184
Freescale Semiconductor MCF51QE128RM manual Intc Software and Level-nIACK Registers n = 1,2,3,...,7, Vecn Swiack