Nonmaskable Interrupts
3-19
CPU Interrupts and Reset
The following lists explains the steps shown in Figure 3
1)
TRAP instruction fetched.
The CPU fetches the TRAP instruction from
program memory. The desired interrupt vector has been specified as an
operand and is now encoded in the instruction word. At this stage, no other
interrupts can be serviced until the CPU begins executing the interrupt ser-
vice routine (step 9).
2)
Empty the pipeline.
The CPU completes any instructions that have
reached or passed the decode 2 phase of the pipeline. Any instructions
that have not reached this phase are flushed from the pipeline.
3)
Increment and temporarily store PC.
The PC is incremented by 1. This
value is the
return address
, which is temporarily saved in an internal hold
register. During the automatic context save (step 6), the return address is
pushed onto the stack.
4)
Fetch interrupt vector.
The PC is set to point to the appropriate vector
location (based on the VMAP bit and the interrupt), and the vector located
at the PC address is loaded into the PC. (To determine which vector ad-
dress has been assigned to each of the interrupts, see section 3.2,
Inter-
rupt Vectors
5)
Increment SP by 1.
The stack pointer (SP) is incremented by 1 in prepara-
tion for the automatic context save (step 6). During the automatic context
save, the CPU performs 32-bit accesses, which are aligned to even ad-
dresses. Incrementing SP by 1 ensures that the first 32-bit access will not
overwrite the previous stack value.
6)
Perform automatic context save.
A number of register values are saved
automatically to the stack. These registers are saved in pairs; each pair
is saved in a single 32-bit operation. At the end of each 32-bit operation,
the SP is incremented by 2. Table 3
3 shows the register pairs and the or-
der in which they are saved. All 32-bit saves are even-word aligned. As
shown in the table, the SP is not affected by this alignment.
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 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...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...