TC1796
System Units (Vol. 1 of 2)
On-Chip Debug Support
User’s Manual
17-6
V2.0, 2007-07
OCDS, V2.0
17.2.1.2 Debug Event Generation
If debug mode is enabled, debug events can be generated by:
•
Debug event generation from debug triggers
•
Activation of the external break input pin BRKIN
•
Execution of a DEBUG instruction
•
Execution of a MTCR/MFCR instruction
Debug Event Generation from Debug Triggers
The debug event generation unit is responsible for generating debug events when a
programmable set of debug triggers is active. Debug triggers can be generated by:
•
The code protection logic
•
The data protection logic
These debug triggers provide the inputs to a programmable block of combinational logic
that outputs debug events. The aim is to be able to specify the breakpoints that use fairly
simple criteria purely in the on-chip debug event generation unit, and to rely on help from
the external debug system or debug monitor to implement more complex breakpoints.
Activation of the External Break Input Pin BRKIN
When activating the TC1796 device pin BRKIN = 0, the MCBS unit induces a break
event as specified in a External Break Input Event Specifier Register EXEVT.
Execution of a DEBUG Instruction
The TriCore architecture supports a mechanism through which software can explicitly
generate a debug event. This can be used, for instance, by a debugger to patch code
held in RAM in order to implement breakpoints. A special DEBUG instruction is defined
which is a user mode instruction, and its operation depends on whether the debug mode
is enabled. 16-bit and 32-bit forms of the DEBUG instruction are provided.
If debug mode is enabled, the DEBUG instruction causes a debug event to be raised and
the action defined in the Software Break Event Specifier Register SWEVT is taken. If the
debug mode is not enabled, then the DEBUG instruction is treated as a NOP instruction.