Download ST62T10 Datasheet

Transcript
ST6210B, 15B, 20B, 25B
IINTERRUPTS (Cont’d)
3.4.3 Interrupt Option Register (IOR)
The Interrupt Option Register (IOR) is used to enable/disable the individual interrupt sources and to
select the operating mode of the external interrupt
inputs. This register is write-only and cannot be
accessed by single-bit operations.
Address: 0C8h — Write Only
Reset status: 00h
7
-
298
SET
GEN
LES
ESB
CLEARED
SET
CLEARED
SET
CLEARED
Enables all interrupts
Disables all interrupts
(Except NMI)
Rising edge mode on Port A
Falling edge mode on Port A
Level sensitive mode on Port B & C
Falling edge mode on Port B & C
0
LES
ESB
GEN
-
-
-
-
Bit 7, Bits 3-0 = Unused.
Bit 6 = LES: Level/Edge Selection bit.
When this bit is set to one, the interrupt #1 (Port A)
is low level sensitive, when cleared to zero the
negative edge sensitive interrupt is selected.
Bit 5 = ESB: Edge Selection bit.
When this bit is set to one, the interrupt #2 (Port B
and C) is positive edge sensitive, when cleared to
zero the negative edge sensitive interrupt is selected.
Bit 4 = GEN: Global Enable Interrupt. When this
bit is set to one, all interrupts are enabled. When
this bit is cleared to zero all the interrupts (excluding NMI) are disabled.
When the GEN bit is low, the NMI interrupt is active
but cannot cause a wake up from STOP/WAIT
modes.
This register is cleared on reset.
38/68
Table 5. Interrupt Options
3.4.4 External Interrupt Operating Modes
The NMI interrupt is associated with the external
interrupt pin. This pin is falling edge sensitive and
the interrupt pin signal is latched by a flip-flop
which is automatically reset by the core at the beginning of the non-maskable interrupt service routine. A Schmitt trigger is present on the NMI pin.
The user can choose to have an on-chip pull-up
on the NMI pin by specifying the appropriate ROM
mask option (see Option List at the end of the Datasheet).
The two interrupt sources associated with the falling/rising edge mode of the external interrupt pins
(Port A-vector #1, Port B & C - vector #2) are connected to two internal latches. Each latch is set
when a falling/rising edge occurs during the
processing of the previous one, will be processed
as soon as the first one has been serviced (unless
a higher priority interrupt request is present). If
more than one interrupt occurs while processing
the first one, the subsequent ones will be lost.
Storage of interrupt requests is not available in
level sensitive detection mode. To be taken into
account, the low level must be present on the interrupt pin when the MCU samples the line after
instruction execution.
At the end of every instruction, the MCU tests the
interrupt lines: if there is an interrupt request the
next instruction is not executed and the appropriate interrupt service routine is executed instead.
When the GEN bit is low, the NMI interrupt is active but cannot cause a wake up from STOP/WAIT
modes.