Interrupts
Am186™CC/CH/CU Microcontrollers User’s Manual
7-7
or clearing of the SRC bit does not affect the vector generated, so INT1 and the USB share
the same interrupt vector. Because only one can be generating interrupts at a time, this is
unambiguous. All channels have a single programmable priority that is set in the CHxCON
register.
7.5.1.1.3
Two Internal Interrupts Request Channels
Channels 4, 5, 6, and 7 support two internal interrupts. There is no SRC bit in the CHxCON
registers for these channels because both sources on the channel can be active at the
same time. For example, channel 4 supports both HDLC_A and SMDA0. These sources
are programmed to either generate or mask their interrupt requests to the channel through
bits in the control registers of the individual peripherals. The channel logic distinguishes
between the different interrupt request sources and generates the vector based on the
source. The channel has a single programmable priority that is set in the CHxCON register.
In addition, the two sources for the channel have relative priorities (see Table 7-3 on
page 7-12). The Interrupt Controller uses the relative priorities to arbitrate between the two
sources when both have interrupt requests pending.
7.5.1.1.4
Shared Interrupt Request Channel
Channel 14 is the shared interrupt request channel. All sources on the shared channel have
the same interrupt vector and the same priority. Software must examine the Shared Request
(SHREQ) register to determine which source generated the interrupt. Note that software
must configure a PIO pin as a PIO input or output before using it as an interrupt source.
7.5.1.2
Using Maskable Interrupts
1. Before configuring the external interrupts INT8–INT0 and the PIO interrupts, clear the
IF flag in the FLAGS register (with the CLI instruction). However, most of the
microcontroller’s internal interrupts can be safely configured while maskable interrupts
are enabled (i.e., the IF flag is set). The IF flag is cleared, disabling maskable interrupts,
when the processor comes out of reset.
2. For PIO interrupts, program the associated PIO pin as a PIO input through the
PIOMODEx and PIODIRx registers.
3. For external interrupts INT8–INT0, program the polarity, active High vs. active Low,
through the INTPOL register.
4. Program the source and priority for the associated interrupt channel through the SRC
and PR bits in the CHxCON register.
Note: Do not perform Step 3 and Step 4 in a single write for edge-sensitive external
interrupts. In this case, the polarity transition may be latched and generate a spurious
interrupt request. Level-sensitive interrupts are not latched so any spurious request
disappears before external interrupts are enabled.
5. Specify the minimum priority required for an interrupt request to be recognized by setting
the PRI bits in the PRIMSK register.
6. Specify the priority for the interrupts generated on a channel by setting the PRI bits in
each of the CHxCON registers. The MSK (mask or enable) bit can be set concurrently.
7. Enable the desired interrupts by programming the CH bits in the IMASK register (if the
MSK bits were not configured in step 6). Because these bits are physically identical to
the MSK bits in each of the CHxCON registers, individual channels can be configured
with the associated CHxCON register.
Note: Do not write to the IMASK register while interrupts are enabled (the IF bit in the
FLAGS register is set). In this case, spurious interrupt requests may be generated, including
requests from devices whose interrupts were disabled both before and after the write to
Содержание 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...