![Infineon Technologies TC1784 Скачать руководство пользователя страница 808](http://html.mh-extra.com/html/infineon-technologies/tc1784/tc1784_user-manual_2055446808.webp)
TC1784
Peripheral Control Processor (PCP)
User´s Manual
10-143
V1.1, 2011-05
PCP, V2.09
two choices here. A boot-time 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 is invoked at boot time or as upon receipt of the very first interrupt.
10.20.4
Dispatch of Low Priority Tasks
A higher-priority channel program may wish to start a low-priority background task, or
periodically pause and re-start itself later when there is no other action required at the
moment. This can be accomplished in several ways:
•
Post an SRPN to a free SRN on the FPI Bus, then EXIT.
•
Perform an EXIT, posting the interrupt to the PCP, and indicating the channel number
to be started.
•
Use a single channel program as a list-driven or state-driven task dispatcher.
The first approach is straightforward to program, but uses a system SRN resource. Its
advantage is that it allows continuous channel operation without using the interrupt
queue, or risk blocking other uses of the PCP.
The second approach can be implemented by having a looping channel program
continue operation in the background. It will also always be superseded by any higher-
priority tasks.
The third approach uses a channel program to dispatch other non-interrupt-driven
channel programs in an arbitrary order determined by the channel program dispatcher.
In this way, multiple tasks could be continuously operated without over-using the PCP
service-request queue. This approach would be useful when the aim is to poll for service
requests in the peripheral SRNs rather than having them started by PCP hardware.
10.20.5
Code Reuse Across Channels (Call and Return)
A special jump instruction is included in the PCP instruction set to allow subroutines to
be called from multiple channel programs. A routine may be jumped to directly, and then
returned from using the JC.IA instruction. JC.IA allows a calling channel program to set
aside a register for its return address, which will typically be the value of the next PC.
The called subprogram can then execute a JC.IA, to the address stored in the register
specified, causing a return-from-subroutine operation. The programmer must adopt and
enforce a calling convention to determine which register holds the return address.
Register R2 is normally used for this purpose.
For example:
Main Routine:
Subroutine:
LD.IL
R2,#RETURN
SUB: MOV...
JC.A
#SUB
ADD...
RETURN: MOV
...
...
...
JC.IA R2
Содержание 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 ...