EasyManuals Logo

Texas Instruments TMS320C28x User Manual

Texas Instruments TMS320C28x
695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #98 background imageLoading...
Page #98 background image
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

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320C28x and is the answer not in the manual?

Texas Instruments TMS320C28x Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320C28x
CategoryProcessor
LanguageEnglish

Related product manuals