![Infineon Technologies TC1796 User Manual Download Page 656](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_2055437656.webp)
TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-119
V2.0, 2007-07
PCP, V2.0
11.13.2
General Purpose Register Use
•
The most significant 16 bits of R7 may not be written, and will always read back as
0. However, no error will occur if a write to the most significant 16 bits occurs.
•
Care must be taken with the use of R6 as a general-use register to ensure that R6
contains the correct value prior to execution of the EXIT command. As R6 contains
the CNT1 (counter used in COPY and optionally in EXIT instructions), SRPN and
TOS (service request number to use during optional interrupt at channel program
EXIT) fields, R6 should not be used to pass values from one invocation of a channel
program to the next invocation.
•
If PRAM is to be accessed programmatically, then R7.DPTR must be configured
properly as a pointer into the PRAM. This points to the 64-word segment that may be
addressed by the xx.P instructions and the xx.PI instructions. It is not recommended
to set R7.DTPR to point into the CSA. Special care must be taken that the Context
PRAM is not overwritten.
•
The programmer must be careful not to inadvertently clear R7.CEN when updating
R7.DTPR (or any other field in R7). This would cause the channel program to
generate a disabled channel interrupt to the CPU when the next interrupt request to
the channel occurs.
•
Any update to the Flags that is caused by an instruction (e.g. MOV R7, R0 which
updates Z and N) takes precedence over any explicit bits that are moved to R7. See
.
•
The interrupt system assumes SRPN 0 is not a request. Full Context packing leaves
the least significant 8
×
32-bit entries where channel 0 would normally be un-used.
That is, PRAM Base -> PRAM Base + 1 channel. In addition, for Small Context, the
least significant 4
×
32-bit entries are un-used, and for Minimum Context the least
significant 2
×
32-bit entries are un-used. These “un-used” entries should not be used
by channel programs.
•
If EP = 0 is used, or if PCP_CS.RCB = 1, a Channel Entry Table must be provided at
the base of CMEM.
•
If there is a plan to use the Small or Minimum Context model, and the lower registers
are to hold global values, then there needs to be an initial channel program that sets
these values at or near boot time. There are at least two choices for implementing
this. For instance, a boot interrupt channel program can be invoked once to perform
initialization, or there can be a program that routinely loads these values as a matter
of course, and it is invoked at boot time, or at the very first interrupt. See
•
When using Small or Minimum Context models and allowing a channel to be
interrupted, care must be taken to ensure that the value of any registers that are not
included in the context but are being used by a channel are not corrupted by
interruption of the channel and subsequent operation of a higher-priority channel.
Particular care must be taken when using instructions that use R0 implicitly. If