
Instruction Set Description
4.6.2.19 DINT
* DINT
Disable (general) interrupts
DINT
Syntax
Operation
0
→
GIE
or
(0FFF7h .AND. SR
→
SR / .NOT.src .AND. dst
→
dst)
BIC #8,SR
Emulation
Description
All interrupts are disabled.
The constant 08h is inverted and logically ANDed with the SR. The result is placed into
the SR.
Status Bits
Status bits are not affected.
Mode Bits
GIE is reset. OSCOFF and CPUOFF are not affected.
Example
The general interrupt enable (GIE) bit in the SR is cleared to allow a nondisrupted move
of a 32-bit counter. This ensures that the counter is not modified during the move by any
interrupt.
DINT
; All interrupt events using the GIE bit are disabled
NOP
MOV
COUNTHI,R5
; Copy counter
MOV
COUNTLO,R6
EINT
; All interrupt events using the GIE bit are enabled
NOTE:
Disable interrupt
If any code sequence needs to be protected from interruption, DINT should be executed at
least one instruction before the beginning of the uninterruptible sequence, or it should be
followed by a NOP instruction.
NOTE:
Enable and Disable Interrupt
Due to the pipelined CPU architecture, the instruction following the enable interrupt
instruction (EINT) is always executed, even if an interrupt service request is pending when
the interrupts are enabled.
If the enable interrupt instruction (EINT) is immediately followed by a disable interrupt
instruction (DINT), a pending interrupt might not be serviced. Further instructions after DINT
might execute incorrectly and result in unexpected CPU execution. It is recommended to
always insert at least one instruction between EINT and DINT. Note that any alternative
instruction use that sets and immediately clears the CPU status register GIE bit must be
considered in the same fashion.
152
CPUX
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated