Chapter 7 Debug Module (DBGV1) Block Description
216
MC9S12C-Family / MC9S12GC-Family
Freescale Semiconductor
Rev 01.24
7.4.2.3
Begin- and End-Trigger
The definitions of begin- and end-trigger as used in the DBG module are as follows:
•
Begin-trigger: Storage in trace buffer occurs after the trigger and continues until 64 locations are
filled.
•
End-trigger: Storage in trace buffer occurs until the trigger, with the least recent data falling out of
the trace buffer if more than 64 words are collected.
7.4.2.4
Arming the DBG Module
In DBG mode, arming occurs by setting DBGEN and ARM in DBGC1. The ARM bit in DBGC1 is cleared
when the trigger condition is met in end-trigger mode or when the Trace Buffer is filled in begin-trigger
mode. The TBC logic determines whether a trigger condition has been met based on the trigger mode and
the trigger selection.
7.4.2.5
Trigger Modes
The DBG module supports nine trigger modes. The trigger modes are encoded as shown in
. The
trigger mode is used as a qualifier for either starting or ending the storing of data in the trace buffer. When
the match condition is met, the appropriate flag A or B is set in DBGSC. Arming the DBG module clears
the A, B, and C flags in DBGSC. In all trigger modes except for the event-only modes and DETAIL capture
mode, change-of-flow addresses are stored in the trace buffer. In the event-only modes only the value on
the data bus at the trigger event B will be stored. In DETAIL capture mode address and data for all cycles
except program fetch (P) and free (f) cycles are stored in trace buffer.
7.4.2.5.1
A Only
In the A only trigger mode, if the match condition for A is met, the A flag in DBGSC is set and a trigger
occurs.
7.4.2.5.2
A or B
In the A or B trigger mode, if the match condition for A or B is met, the corresponding flag in DBGSC is
set and a trigger occurs.
7.4.2.5.3
A then B
In the A then B trigger mode, the match condition for A must be met before the match condition for B is
compared. When the match condition for A or B is met, the corresponding flag in DBGSC is set. The
trigger occurs only after A then B have matched.
NOTE
When tagging and using A then B, if addresses A and B are close together,
then B may not complete the trigger sequence. This occurs when A and B
are in the instruction queue at the same time. Basically the A trigger has not
yet occurred, so the B instruction is not tagged. Generally, if address B is at
Summary of Contents for MC9S12C Family
Page 689: ......