Interrupts
7-18
Am186™CC/CH/CU Microcontrollers User’s Manual
7.5.5.6
PIOs as Interrupts
Eight PIOs (PIO5, PIO15, PIO27, PIO29, PIO30, PIO33, PIO34, and PIO35) are
programmable as external interrupt sources on shared Channel 14. These PIOs are level-
triggered. PIO15, PIO29, PIO30, PIO33, PIO34, and PIO35 default to their alternate
function at external or internal reset. To use these signals as interrupts, enable them as
interrupts in the SHMASK register. Typically, software should configure these signals as
inputs in the PIOMODEx and PIODIRx registers when using them as interrupt sources. If
any of these signals is configured as both a PIO output and as an interrupt source, the PIO
output signal generates interrupts. For more information, see Table 9-3 on page 9-6.
In addition, three PIOs (PIO6, PIO7, and PIO19) are multiplexed with external interrupt
signals (INT8, INT7, and INT6, respectively) so they can act as interrupts when the signal’s
interrupt signal is enabled. These signals can be programmed with the LTM bit in the
CHxCON register to be edge- or level-triggered.
7.5.5.7
Registers Used
Each interrupt channel has a control register, an in-service bit, a request bit, and a mask
bit programmed with the 15 Channel Control registers, the In-Service register, the Interrupt
Request register, and the Interrupt Mask register. Because Channel 14 shares interrupts,
it requires two additional registers to implement the shared interrupts: the Shared Mask
register and the Shared Request register. The control register for Channel 14 contains a
priority field and mask bit only. For detailed information about these and the other peripheral
registers used to control interrupts, see the
Am186™CC/CH/CU Microcontrollers Register
Set Manual, order #21916.
In addition, bits 8 and 9 in the FLAGS register relate to interrupt operation.
Bit 8 of the FLAGS register is the Trace Flag (TF). When TF is set to 1, a trace interrupt
occurs after each instruction executes. TF is cleared by the trace interrupt after the
processor status flags are pushed onto the stack. The trace service routine can continue
tracing by popping the flags back with an IRET instruction.
Bit 9 of the FLAGS register is the Interrupt Enable Flag (IF). IF acts as an enable for all
maskable interrupts.
If IF is set to 1, maskable interrupts are enabled and can cause processor interrupts.
Individual maskable interrupts can still be disabled through their corresponding mask bit in
the IMASK or CHxCON registers. Some peripheral devices have their own interrupt mask
bits, as well.
Clearing IF to 0 disables all maskable interrupts regardless of the setting of the mask bits
in the IMASK or CHxCON registers or any other peripheral control mask bits. The IF flag
does not affect the NMI, trace, or software exception interrupts (interrupt types 00h to 07h),
and it does not affect the execution of any interrupt through the INT instruction.
7.5.6
Nonmaskable Interrupts
Interrupt types 00h through 07h (see Table 7-3 on page 7-12) and all software interrupts
cannot be masked by programming, and are not affected by the setting of the IF flag.
Software interrupts are initiated with the INT or INTO instruction. A software exception
interrupt occurs when an instruction causes an interrupt due to some condition in the
processor. Interrupt types 00h, 03h, 04h, 05h, 06h, and 07h are software exception
interrupts. For more information about INT or other instructions, see the
Am186 and Am188
Family Instruction Set Manual, order #21267.
Содержание 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...