Nonmaskable Interrupts
3-18
3.5.2 TRAP Instruction
You can use the TRAP instruction to initiate any interrupt, including one of the
user-defined software interrupts (see USER1
−
3-4). The TRAP instruction refers to one of the 32 interrupts by a number from
0 to 31. For example, you can execute the interrupt service routine for INT1
by using the following instruction:
TRAP
#1
Regardless of whether the interrupt has bits set in the IFR and IER, neither the
IFR nor the IER is affected by this instruction. Figure 3
flow chart for an interrupt initiated by the TRAP instruction. For more details
about the TRAP instruction, see Chapter 6,
C28x Assembly Language Instruc-
tions
.
Note:
The TRAP #0 instruction does not initiate a full reset. It only forces execution
of the interrupt service routine that corresponds to the RESET interrupt vec-
tor.
Figure 3
−
5. Functional Flow Chart for an Interrupt Initiated by the TRAP Instruction
TRAP instruction fetched
Increment and temporarily store PC.
Fetch interrupt vector.
Perform automatic context save.
Increment SP by 1.
Empty the pipeline.
Set INTM and DBGM. Clear LOOP,
EALLOW, and IDLESTAT.
Execute interrupt service routine.
Program continues
Load PC with fetched vector.
This sequence
protected from
INTM bit, IFR,
interrupts
IER, and DBGIER
ignored and not affected
Summary of Contents for TMS320C28x
Page 30: ...1 12...
Page 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Page 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Page 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Page 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Page 585: ...This page intentionally left blank 7 32 This page intentionally left blank...