Interrupt Handler Example—Single-Event Interrupt Source; Cpm Interrupt Vector Register (Civr) - Freescale Semiconductor MPC850 User Manual

Mpc850 family integrated communications microprocessor
Table of Contents

Advertisement

Interrupt Handler Example—Single-Event Interrupt Source

35.5.5 CPM Interrupt Vector Register (CIVR)

The CPM interrupt vector register (CIVR) is used to identify an interrupt source. The core
uses the IACK bit to acknowledge an interrupt. CIVR can be read at any time.
Bit
0
1
Field
VN
Reset
R/w
Address
Figure 35-5. CPM Interrupt Vector Register (CIVR)
Table 35-4
describes
Example—Single-Event Interrupt Source," and Section 35.7, "Interrupt Handler
Example—Multiple-Event Interrupt Source," show how CIVR fields are used.
Bits
Name
0–4
VN
Vector number. Identifies the interrupt source. These values are listed in Table 35-2.
5–14 —
Reserved. Writing to bits 5-15 has no effect because they are always read as zeros.
15
IACK
Interrupt acknowledge. When the core sets IACK, CIVR[VN] is updated with a 5-bit vector
corresponding to the sub-block with the highest current priority. IACK is cleared after one clock cycle.
35.6 Interrupt Handler Example—Single-Event
Interrupt Source
In this example, the CPIC hardware clears CIPR[PC6] during the interrupt acknowledge
cycle. The following steps show how to handle an interrupt source without multiple events.
1. Set CIVR[IACK].
2. Read CIVR[VN] to determine the vector number for the interrupt handler.
3. Handle the interrupt event indicated through the port C6 signal.
4. Clear CISR[PC6].
5. Execute the rfi instruction.
2
3
4
5
0000_00000_0000_0000
CIVR
fields.
Table 35-4. CIVR Field Descriptions
MPC850 Family User's Manual
6
7
8
9
0
R/W
0x930
Section 35.6,
Description
10
11
12
13
"Interrupt
14
15
IACK
Handler

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpc850deMpc850dslMpc850sr

Table of Contents