Chapter 19 Debug Module (DBGV1)
MC9S12HZ256 Data Sheet, Rev. 2.05
536
Freescale Semiconductor
The DBG in DBG mode includes these distinctive features:
Three comparators (A, B, and C)
— Dual mode, comparators A and B used to compare addresses
— Full mode, comparator A compares address and comparator B compares data
— Can be used as trigger and/or breakpoint
— Comparator C used in LOOP1 capture mode or as additional breakpoint
Four capture modes
— Normal mode, change-of-ow information is captured based on trigger specication
— Loop1 mode, comparator C is dynamically updated to prevent redundant change-of-ow
storage.
— Detail mode, address and data for all cycles except program fetch (P) and free (f) cycles are
stored in trace buffer
— Prole mode, last instruction address executed by CPU is returned when trace buffer address is
read
Two types of breakpoint or debug triggers
— Break just before a specic instruction will begin execution (tag)
— Break on the rst instruction boundary after a match occurs (force)
BDM or SWI breakpoint
— Enter BDM on breakpoint (BDM)
— Execute SWI on breakpoint (SWI)
Nine trigger modes for comparators A and B
—A
— A or B
— A then B
— A and B, where B is data (full mode)
— A and not B, where B is data (full mode)
— Event only B, store data
— A then event only B, store data
— Inside range, A
≤ address ≤ B
— Outside range, address
< Α or address > B
Comparator C provides an additional tag or force breakpoint when capture mode is not congured
in LOOP1 mode.
Sixty-four word (16 bits wide) trace buffer for storing change-of-ow information, event only data
and other bus information.
— Source address of taken conditional branches (long, short, bit-conditional, and loop constructs)
— Destination address of indexed JMP, JSR, and CALL instruction.
— Destination address of RTI, RTS, and RTC instructions
— Vector address of interrupts, except for SWI and BDM vectors