![Infineon Technologies TC1796 Скачать руководство пользователя страница 573](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_2055437573.webp)
TC1796
System Units (Vol. 1 of 2)
Peripheral Control Processor (PCP)
User’s Manual
11-36
V2.0, 2007-07
PCP, V2.0
11.5.4.3 Service Request on Error
While a service request triggered through an EXIT instruction is optional and can be
issued either to the CPU or to the PCP itself, a service request due to an error condition
will always be automatically issued and will always be directed to the CPU. The PCP
issues a service request to the CPU queue of the service request nodes. Along with this
request, it passes the SRPN stored in the ESR field of register PCP_CS to the queue. If
the queue has a free entry left, the SRR flag of the associated service request register,
PCP_SRCx, will be set, and the SRPN will be written to the SRPN field of the SRC
register. See next section for the case when there is no free entry in the queue (queue
full).
Due to the fact that the priority number is stored in the global control register PCP_CS,
all channel programs share the same service request routine in case of an error. The
exact cause of the error and the channel number of the program that was executed when
the error occurred can be determined through examination of the contents of the
Error/Debug Status Register, PCP_ES.
11.5.4.4 Queue Full Operation
Queuing the implicit service requests typically allows the PCP to continue with the next
service request without stalling. The depth of the queue and the number of channel
programs using them determines the stall rate. Depending on the selected service
provider (via R6.TOS in case of an EXIT interrupt or always to the CPU in case of an
error interrupt), the request is routed to a free entry in the appropriate queue.
If no free entries are available in a queue at the time the PCP wants to post a request to
that queue, the PCP is forced to stall until an entry becomes clear. This ensures that the
PCP does not lose any interrupts. An entry in a queue becomes free when its SRR flag
is cleared through an acknowledge from the PICU (that is, the CPU or PCP, as
appropriate, has started to service this request).
One special case needs to be resolved for the PCP-related queue through special
operation of the PICU. Consider the case in which the PCP queue is full, meaning
registers PCP_SRC2, PCP_SRC3 and PCP_SRC9 to PCP_SRC11 are already loaded
with pending service requests to the PCP. If the PCP kernel now needed to post an
additional service request into that queue, a deadlock situation would be generated: The
PCP would stall, since there is not a free entry in the PCP queue in which to place the
request. In turn, as the PCP is stalled, it cannot accept new service requests and so the
PCP service request queue cannot be emptied. This would result in a deadlock of the
PCP.
To avoid such a deadlock, the PICU performs a special arbitration round as soon as the
PCP queue becomes full. In this arbitration round, only the service request nodes
assigned to the PCP queue are allowed to participate; all service requests from nodes
external to the PCP are excluded, regardless of whether their priorities are higher or