Chapter 19 Debug Module (DBG) (64K)
MC9S08LG32 MCU Series, Rev. 5
366
Freescale Semiconductor
When traditional hardware breakpoints from comparators A or B are desired, set BEGIN=0 to select an
end-trace run and set the trigger mode to either 0x0 (A-only) or 0x1 (A OR B) mode.
There are two types of breakpoint requests supported by the DBG module, tag-type and force-type. Tagged
breakpoints are associated with opcode addresses and allow breaking just before a specific instruction
executes. Force breakpoints are not associated with opcode addresses and allow breaking at the next
instruction boundary. The TAG bit in the DBGC register determines whether CPU breakpoint requests will
be a tag-type or force-type breakpoints. When TAG=0, a force-type breakpoint is requested and it will take
effect at the next instruction boundary after the request. When TAG=1, a tag-type breakpoint is registered
into the instruction queue and the CPU will break if/when this tag reaches the head of the instruction queue
and the tagged instruction is about to be executed.
19.4.2.1
Hardware Breakpoints
Comparators A, B, and C can be used as three traditional hardware breakpoints whether the on-chip ICE
real-time capture function is required or not. To use any breakpoint or trace run capture functions set
DBGEN=1. BRKEN and TAG affect all three comparators. When BRKEN=0, no CPU breakpoints are
enabled. When BRKEN=1, CPU breakpoints are enabled and the TAG bit determines whether the
breakpoints will be tag-type or force-type breakpoints. To use comparators A and B as hardware
breakpoints, set DBGT=0x81 for tag-type breakpoints and 0x01 for force-type breakpoints. This sets up
an end-type trace with trigger mode “A OR B”.
Comparator C is not involved in the trigger logic for the on-chip ICE system.
19.4.3
Trigger Selection
The TRGSEL bit in the DBGT register is used to determine the triggering condition of the on-chip ICE
system. TRGSEL applies to both trigger A and B except in the event only trigger modes. By setting the
TRGSEL bit, the comparators will qualify a match with the output of opcode tracking logic. The opcode
tracking logic is internal to each comparator and determines whether the CPU executed the opcode at the
compare address. With the TRGSEL bit cleared a comparator match is all that is necessary for a trigger
condition to be met.
NOTE
If the TRGSEL is set, the address stored in the comparator match address
registers must be an opcode address for the trigger to occur.
19.4.4
Trigger Break Control (TBC)
The TBC is the main controller for the DBG module. Its function is to decide whether data should be stored
in the FIFO based on the trigger mode and the match signals from the comparator. The TBC also
determines whether a request to break the CPU should occur.
The TAG bit in DBGC controls whether CPU breakpoints are treated as tag-type or force-type breakpoints.
The TRGSEL bit in DBGT controls whether a comparator A or B match is further qualified by opcode
tracking logic. Each comparator has a separate circuit to track opcodes because the comparators could
Содержание MC9S08LG16
Страница 2: ......
Страница 4: ......
Страница 8: ......
Страница 20: ......
Страница 26: ...Chapter 1 Device Overview MC9S08LG32 MCU Series Rev 5 26 Freescale Semiconductor...
Страница 40: ...Chapter 2 Pins and Connections MC9S08LG32 MCU Series Rev 5 40 Freescale Semiconductor...
Страница 96: ...Chapter 5 Resets Interrupts and General System Control MC9S08LG32 MCU Series Rev 5 96 Freescale Semiconductor...
Страница 296: ...Chapter 12 Serial Peripheral Interface S08SPIV4 MC9S08LG32 MCU Series Rev 5 296 Freescale Semiconductor...
Страница 372: ......