TC1784
Peripheral Control Processor (PCP)
User´s Manual
10-142
V1.1, 2011-05
PCP, V2.09
JC
ERROR,cc_NZ
;jump to error routine
;if not correct
ADD.I
R5,#0x1
;increment state number
EXIT EC=1,ST=0,INT=0,EP=1,cc_UC
;begin exit
STATE1:
COMP.I
R5,#0x1
;compare to interrupt number
;it should be
JC
ERROR,cc_NZ
;jump to error routine
;if not correct
ADD.I
R5,#0x1
;increment state number
EXIT EC=1,ST=0,INT=0,EP=1,cc_UC
;begin exit
STATE2:
COMP.I
R5,#0x2
;compare to interrupt number
;it should be
JC
ERROR,cc_NZ
;jump to error routine if
;not correct
LD.I
R5,#0x0
;reset state number
JC
START,cc_UC
;jump back to start of
;state machine
The last state could just as easily have ended with an EXIT that resets the PC to the
Channel Entry Table (EP = 0) rather than jumping back to START.
10.20.2
Channel Management for Small and Minimum Contexts
If Small or Minimum Contexts are being used, only some of the registers are saved and
restored. The integrity of the GPRs that are
not
included in the context must be handled
explicitly by channel programs, since these are not saved and restored with the context
of the interrupted channel program.
Channel programs may still use all registers reliably. Channel programs can be so
designed that they either ignore the values in unsaved registers, or use those registers
to store constants that no channel program changes. Hence, they never need to be
saved and restored. Alternately, channel programs can use these unused GPRs as
temporary variables as long as the values of such registers cannot be corrupted by the
interrupt of the channel program by a higher-priority channel (see
10.20.3
Unused Registers as Global’s or Constants
Registers R0 through R3 (for the Small Context Model), or R0 through R5 (for the
Minimum Context Model) can be used to store constants such as addresses that are
available to all channel programs. Hence, these registers hold global data, and no
channel program is allowed to change them.
Since the GPRs of the PCP are not directly accessible from the FPI Bus, there does need
to be an initial channel program that sets these values at or near boot time. There are
Содержание TC1784
Страница 1: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Страница 3: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Страница 950: ...TC1784 Direct Memory Access Controller DMA User s Manual 11 132 V1 1 2011 05 DMA V3 03 ...
Страница 1949: ...TC1784 General Purpose Timer Array GPTA v5 User s Manual 21 297 V1 1 2011 05 GPTA v5 V1 14 ...
Страница 2350: ...w w w i n f i n e o n c o m Published by Infineon Technologies AG Doc_Number ...