TC1784
Peripheral Control Processor (PCP)
User´s Manual
10-148
V1.1, 2011-05
PCP, V2.09
10.21.3
Use of Channel Interruption
For channel interruption, the following note should be regarded.
•
When a channel program consists of only a few instructions, it is best to configure the
channel to be non-interruptible. This increases overall efficiency by removing the
context save/restore overhead that would be incurred if the channel were to be
interruptible.
10.21.3.1 Dynamic Interrupt Masking
A channel program can dynamically control whether it can be interrupted by use of the
R7.IEN bit. When masking interrupts (by clearing R7.IEN), it must be noted that there is
a delay of one instruction before the mask becomes effective. As a result the instruction
that clears R7.IEN must be placed at least one instruction before the instruction
sequence that is to be un-interruptible. As an example, consider the following sequence:
CLR
R7,IEN
;Clear the R7.IEN bit
;<< Interrupt can occur here
NOP
;<< Interrupt can occur here
;First instruction of non-interruptible
;code sequence
10.21.3.2 Control of Channel Priority (CPPN)
The PCP has three extended Service Request Nodes (PCP_SRC9, PCP_SRC10 and
PCP_SCR11) that allow storage of suspended channel interrupt requests. This allows
interrupt nesting to a depth of four. This limit on the nesting depth carries the danger that
a high-priority service request will not be serviced because the PCP’s interrupt nesting
depth has been exceeded.
It is recommended that a four-level “grouping” scheme should be adopted to avoid this
problem. All PCP interrupt sources should be listed in order of their SRPNs.This list
should then be subdivided into four contiguous groups, Group 0 being the lowest priority
and Group 3 the highest. The CSA for each channel program should be configured such
that CR6.CPPN contains the SRPN value of the highest channel program within the
group to which the channel belongs. As each channel starts, the Operating Priority
(CPPN) of the channel is loaded from the context. Using the scheme recommended
above, any channel program will run with the priority of the highest SRPN within the
group. As a result, the channel can only be interrupted by a service request from a
higher-priority group (e.g. a Group 0 channel program can be interrupted by a new
service request for a channel in any group from 1 to 3, a group 2 channel program can
only be interrupted by a new service request for a channel in group 3).
Summary of Contents for TC1784
Page 1: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Page 3: ...User s Manual V1 1 2011 05 Microcontrollers TC1784 32 Bit Single Chip Microcontroller ...
Page 950: ...TC1784 Direct Memory Access Controller DMA User s Manual 11 132 V1 1 2011 05 DMA V3 03 ...
Page 1949: ...TC1784 General Purpose Timer Array GPTA v5 User s Manual 21 297 V1 1 2011 05 GPTA v5 V1 14 ...
Page 2350: ...w w w i n f i n e o n c o m Published by Infineon Technologies AG Doc_Number ...