EasyManua.ls Logo

Texas Instruments TMS320C28x - Functional Flow Chart for an Interrupt Initiated by the TRAP Instruction

Texas Instruments TMS320C28x
695 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 USER1USER12 in Table 31 on page
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 35 shows a functional
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 35. 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

Table of Contents

Related product manuals