
DSK Communications Kernel
4-11
Functional Overview
Interrupts
The communications kernel implements breakpoints by replacing the code at
the desired location with a TRAPn opcode. When the CPU encounters a
TRAP, the context-save routine is invoked, the CPU enters spin mode, writes
an acknowledge to the host, and waits for a new command. While in spin
mode, the CPU can receive new interrupts.
The communications kernel implements CPU halt
(XHALT) in a manner similar
to breakpoint halts, but the interrupt source originates from the host, not a
TRAP opcode. The main difference is that the registers used by the commu-
nications kernel are restored before invoking a full context save and falling into
spin mode.
The kernel implements
XRUN by restoring the context followed by a standard
return from interrupt. The processor is then free to execute code.
The communications kernel implements the opcode XSTEP by using a re-
served interrupt in the ’C31: Serial Port 1 transmit interrupt (XINT1).
Figure 4–6, on page 4-12, shows the single-step routine flow diagram. The
communications kernel:
-
Restores the context of the CPU
-
Places the program counter into R5
-
Clears INT2
-
Sets the XINT1 interrupt
-
Restores the status register
-
Sets a delayed branch on R5
The delayed branch executes the next three instructions:
1) Sets the global interrupt enable
2) Restores R5
3) Restores the data page pointer
By coordinating the setting of the XINT1 interrupt and the branch-to-the-user
program, the kernel allows only a single instruction to execute before servicing
the pending interrupt. When the interrupt is recognized, the kernel saves the
CPU context, sends an acknowledge to the host, branches to the spin mode,
and waits for a new command.
Содержание TMS320C3 Series
Страница 1: ...TMS320C3x DSP Starter Kit User s Guide...
Страница 18: ...1 4...
Страница 28: ...2 10...
Страница 82: ...5 18...
Страница 140: ...Communications Kernel Source Code A 12...
Страница 145: ...Schematics B 5 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 146: ...Schematics B 6...
Страница 147: ...Schematics B 7 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 148: ...Schematics B 8...
Страница 149: ...Schematics B 9 DSK Circuit Board Dimensions and Schematic Diagrams...
Страница 150: ...Schematics B 10...
Страница 154: ...B 14...
Страница 160: ...C 6...
Страница 166: ...Index 6...