Interrupts
7-8
Am186™CC/CH/CU Microcontrollers User’s Manual
the IMASK register. It is safe to write the MSK bits in the CHxCON registers while interrupts
are enabled.
8. Program the SHMASK register to enable the INT and PIO interrupts that share
Channel 14. The SHREQ interrupt request is generated if any shared interrupt is
asserted that is not masked off in the SHMASK register.
9. If interrupts are not enabled, enable interrupts by setting the IF flag in the FLAGS register
using the STI instruction.
7.5.1.3
Using Nonmaskable Interrupts
To generate an NMI, use the NMI signal or watchdog timer. To generate a trace interrupt,
set the TF bit in the FLAGS register. To generate a software interrupt, execute an Am186
instruction that generates an interrupt. This can be the INT or INTO instruction, or a software
exception caused by an instruction. For more information, see “Nonmaskable Interrupts”
on page 7-18.
7.5.2
Definitions of Interrupt Terms
The following definitions cover some of the terminology used in describing interrupts.
■
Interrupt Channel: The group of logic that is comprised of a control register, an in-
service bit, a request bit, and a mask bit.
■
Interrupt Source:
Any source such as an on-chip peripheral (internal) or physical pin
(external) that can request an interrupt.
■
Interrupt Type
: An eight-bit number assigned to each discrete interrupt, as listed in
Table 7-3 on page 7-12. Each interrupt type does not need a unique interrupt channel;
one interrupt channel can support more than one interrupt type. However, if one channel
supports two interrupt types, then those two types have the same level of programmable
priority.
■
Programmable Priority: Each channel has eight levels of programmable priority, which
are set in the Channel Control (CHxCON) register. Programmable priority determines
which interrupt to service when two interrupts are requested at the same time. An
interrupt service routine is interrupted by another interrupt request of equal or higher
programmable priority, as long as the IF flag in the FLAGS register is set. For more
information on setting the FLAGS register, see Chapter 2, “Configuration Basics.” If the
programmable priority levels are equal, the overall priority number is used to resolve
requests generated at the same time. The overall priority is not used to determine if a
pending interrupt can interrupt an already executing interrupt service routine (ISR).
■
Overall Priority: Each interrupt source has an overall priority number which is only used
to arbitrate between two interrupt sources that have priority requests pending with the
same programmable priority level. Overall priority is not used if the programmable priority
is sufficient to resolve the pending highest-priority request.
■
Interrupt Vector Address: This equals the interrupt type times four and is the location
in memory that stores the address of the interrupt service routine for each interrupt type.
■
Interrupt Vector Table: A memory area of 1 Kbyte beginning at address 00000h that
contains up to 256 four-byte interrupt vector addresses organized by segment/offset.
■
Maskable Interrupts: Maskable interrupts can be affected by programming and are
enabled and disabled by setting the IF flag in the FLAGS register.
■
Nonmaskable Interrupts: Nonmaskable interrupts cannot be affected by programming,
nor are they affected by the IF flag.
Содержание Am186 CC
Страница 1: ...Am186 CC CH CU Microcontrollers User s Manual Order 21914B...
Страница 4: ...iv Am186 CC CH CU Microcontrollers User s Manual...
Страница 18: ...Table of Contents xviii Am186 CC CH CU Microcontrollers User s Manual...
Страница 24: ...Introduction xxiv Am186 CC CH CU Microcontrollers User s Manual...
Страница 39: ...Architectural Overview Am186 CC CH CU Microcontrollers User s Manual 1 15 Figure 1 6 32 Channel Linecard CH CC...
Страница 40: ...Architectural Overview 1 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 86: ...System Overview 3 36 Am186 CC CH CU Microcontrollers User s Manual...
Страница 92: ...Emulator Support 4 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 112: ...DRAM Controller 6 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 134: ...Interrupts 7 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 186: ...Programmable I O Signals 9 8 Am186 CC CH CU Microcontrollers User s Manual...
Страница 200: ...Watchdog Timer 11 6 Am186 CC CH CU Microcontrollers User s Manual...
Страница 232: ...Asynchronous Serial Ports UARTs 13 24 Am186 CC CH CU Microcontrollers User s Manual...
Страница 242: ...Synchronous Serial Port SSI 14 10 Am186 CC CH CU Microcontrollers User s Manual...
Страница 264: ...High Level Data Link Control HDLC 15 22 Am186 CC CH CU Microcontrollers User s Manual...
Страница 332: ...Universal Serial Bus USB 18 34 Am186 CC CH CU Microcontrollers User s Manual...
Страница 348: ...Register Summary A 16 Am186 CC CH CU Microcontrollers User s Manual...
Страница 376: ...Index Index 18 Am186 CC CH CU Microcontrollers User s Manual...