TC1784
Peripheral Control Processor (PCP)
User´s Manual
10-59
V1.1, 2011-05
PCP, V2.09
10.14
Debugging the PCP
For debugging the PCP, a special instruction, DEBUG, is provided. This instruction can
only be used when the PCP is in Debug Mode. It can be placed at important locations
inside the code to track and trace program execution. The execution of the instruction
depends on a condition code specified with the instruction. The actions programmed for
this instruction will only take place if the specified condition is true.
The following actions are performed when the DEBUG instruction is executed and the
condition code is true:
•
Store the current PC, i.e. the address of the DEBUG instruction, in register
PCP_ES.EPC
•
Store the current channel number in register PCP_ES.EPN
In addition, the following operations can be programmed through fields in the DEBUG
instruction:
•
Optionally stop the channel program execution (instruction field SDB)
•
Optionally generate an external debug event at pin BRKOUT (instruction field EDA)
•
Optionally prevent the PCP from executing any further channel programs (instruction
field DAC)
•
Optionally cause the PCP to decrement the PC prior to saving the channel context
(instruction field RTA)
If the DEBUG instruction is programmed to stop the channel program execution, the
action taken by the PCP depends on the value of the RTA instruction field:
•
If RTA = 0, the PCP disables further invocations of the current channel through
clearing bit R7.CEN, and then performs a context save. The execution of this channel
is stopped at the point of the DEBUG instruction. If the DAC instruction field = 0, the
PCP will continue to operate, accepting service requests for other channels as they
arise. Since the stopped channel was disabled before saving its context, service
requests for this channel will result in an error exit (see
). When re-enabling
the channel, its enable bit CEN in the saved context location CR7 must be set.
•
If RTA = 1, the PCP does not modify bit R7.CEN (i.e. the channel remains enabled),
decrements the PC (so that it again points to the DEBUG instruction), and then
performs a context save. The execution of this channel is stopped at the point of the
DEBUG instruction. If the DAC instruction field = 0, the PCP will continue to operate,
accepting service requests for channels as they arise. Since the stopped channel
was not disabled before saving its context, service requests for this channel will not
result in an error exit, but will simply cause re-execution of the DEBUG instruction
and hence a repeat of the channel exit.
Note: When a channel is stopped by DEBUG, the context of the stopped channel will be
saved to the appropriate region of the CSA before the channel terminates. Where
a Small or Minimum Context model is being used, the values of the GPRs not
included in the context will not be saved, and indeed these register values may be
Содержание 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 ...