
Chapter 16 Debug Module (DBGV1) Block Description
MC9S12KG128 Data Sheet, Rev. 1.16
482
Freescale Semiconductor
16.3.2.1
Debug Control Register 1 (DBGC1)
NOTE
All bits are used in DBG mode only.
NOTE
This register cannot be written if BKP mode is enabled (BKABEN in
DBGC2 is set).
1 The DBG module is designed for backwards compatibility to existing BKP modules. Register and bit names have changed from
the BKP module. This column shows the DBG register name, as well as the BKP register name for reference.
2 Comparator C can be used to enhance the BKP mode by providing a third breakpoint.
Module Base + 0x0020
Starting address location affected by INITRG register setting.
76543210
R
DBGEN
ARM
TRGSEL
BEGIN
DBGBRK
0
CAPMOD
W
Reset
0
00000
= Unimplemented or Reserved
Figure 16-4. Debug Control Register (DBGC1)
Table 16-3. DBGC1 Field Descriptions
Field
Description
7
DBGEN
DBG Mode Enable Bit — The DBGEN bit enables the DBG module for use in DBG mode. This bit cannot be
set if the MCU is in secure mode.
0 DBG mode disabled
1 DBG mode enabled
6
ARM
Arm Bit — The ARM bit controls whether the debugger is comparing and storing data in the trace buffer. See
0 Debugger unarmed
1 Debugger armed
Note: This bit cannot be set if the DBGEN bit is not also being set at the same time. For example, a write of 01
to DBGEN[7:6] will be interpreted as a write of 00.
5
TRGSEL
Trigger Selection Bit — The TRGSEL bit controls the triggering condition for comparators A and B in DBG
mode. It serves essentially the same function as the TAGAB bit in the DBGC2 register does in BKP mode. See
based on comparator A and B if enabled in DBG mode (DBGBRK = 1). Please refer to
Section 16.4.3.1,0 Trigger on any compare address match
1 Trigger before opcode at compare address gets executed (tagged-type)