English
Language : 

S912XHY128F0VLM Datasheet, PDF (228/802 Pages) Freescale Semiconductor, Inc – S12 Microcontrollers
S12X Debug (S12XDBGV3) Module
6.3.2.1 Debug Control Register 1 (DBGC1)
Address: 0x0020
R
W
Reset
7
ARM
0
6
0
TRIG
0
5
reserved
0
4
BDM
0
3
DBGBRK
0
2
reserved
0
1
0
COMRV
0
0
Figure 6-3. Debug Control Register (DBGC1)
Read: Anytime
Write: Bits 7, 1, 0 anytime
Bit 6 can be written anytime but always reads back as 0.
Bits 5:2 anytime S12XDBG is not armed.
NOTE
If a write access to DBGC1 with the ARM bit position set occurs
simultaneously to a hardware disarm from an internal trigger event, then the
ARM bit is cleared due to the hardware disarm.
NOTE
When disarming the S12XDBG by clearing ARM with software, the
contents of bits[5:2] are not affected by the write, since up until the write
operation, ARM = 1 preventing these bits from being written. These bits
must be cleared using a second write if required.
Table 6-4. DBGC1 Field Descriptions
Field
7
ARM
6
TRIG
5
reserved
4
BDM
Description
Arm Bit — The ARM bit controls whether the S12XDBG module is armed. This bit can be set and cleared by
user software and is automatically cleared on completion of a tracing session, or if a breakpoint is generated with
tracing not enabled. On setting this bit the state sequencer enters State1.
0 Debugger disarmed
1 Debugger armed
Immediate Trigger Request Bit — This bit when written to 1 requests an immediate trigger independent of
comparator signal status. When tracing is complete a forced breakpoint may be generated depending upon
DBGBRK and BDM bit settings. This bit always reads back a 0. Writing a 0 to this bit has no effect. If TSOURCE
is clear no tracing is carried out. If tracing has already commenced using BEGIN- or MID trigger alignment, it
continues until the end of the tracing session as defined by the TALIGN bit settings, thus TRIG has no affect. In
secure mode tracing is disabled and writing to this bit has no effect.
0 Do not trigger until the state sequencer enters the Final State.
1 Trigger immediately .
This bit is reserved, setting it has no meaning or effect.
Background Debug Mode Enable — This bit determines if an S12X breakpoint causes the system to enter
Background Debug Mode (BDM) or initiate a Software Interrupt (SWI). If this bit is set but the BDM is not enabled
by the ENBDM bit in the BDM module, then breakpoints default to SWI.
0 Breakpoint to Software Interrupt if BDM inactive. Otherwise no breakpoint.
1 Breakpoint to BDM, if BDM enabled. Otherwise breakpoint to SWI
MC9S12XHY-Family Reference Manual, Rev. 1.01
228
Freescale Semiconductor