S12X Debug (S12XDBGV3) Module
S12XS Family Reference Manual, Rev. 1.13
216
Freescale Semiconductor
6.4.1
S12XDBG Operation
Arming the S12XDBG module by setting ARM in DBGC1 allows triggering, and storing of data in the
trace buffer and can be used to cause breakpoints to the CPU12X . The DBG module is made up of four
main blocks, the comparators, control logic, the state sequencer, and the trace buffer.
The comparators monitor the bus activity of the CPU12X . Comparators can be configured to monitor
address and databus. Comparators can also be configured to mask out individual data bus bits during a
compare and to use R/W and word/byte access qualification in the comparison. When a match with a
comparator register value occurs the associated control logic can trigger the state sequencer to another state
(see
). Either forced or tagged triggers are possible. Using a forced trigger, the trigger is
generated immediately on a comparator match. Using a tagged trigger, at a comparator match, the
instruction opcode is tagged and only if the instruction reaches the execution stage of the instruction queue
is a trigger generated. In the case of a transition to Final State, bus tracing is triggered and/or a breakpoint
can be generated.
Independent of the state sequencer, a breakpoint can be triggered by writing to the TRIG bit in the DBGC1
control register.
The trace buffer is visible through a 2-byte window in the register address map and can be read out using
standard 16-bit word reads.
6.4.2
Comparator Modes
The S12XDBG contains four comparators, A, B, C, and D. Each comparator compares the selected address
bus with the address stored in DBGXAH, DBGXAM, and DBGXAL. Furthermore, comparators A and C
also compare the data buses to the data stored in DBGXDH, DBGXDL and allow masking of individual
data bus bits.
S12X comparator matches are disabled in BDM and during BDM accesses.
The comparator match control logic configures comparators to monitor the buses for an exact address or
an address range. The comparator configuration is controlled by the control register contents and the range
control by the DBGC2 contents.
On a match a trigger can initiate a transition to another state sequencer state (see
). The
comparator control register also allows the type of access to be included in the comparison through the use
of the RWE, RW, SZE, and SZ bits. The RWE bit controls whether read or write comparison is enabled
for the associated comparator and the RW bit selects either a read or write access for a valid match.
Similarly the SZE and SZ bits allows the size of access (word or byte) to be considered in the compare.
Only comparators B and D feature SZE and SZ.
The TAG bit in each comparator control register is used to determine the triggering condition. By setting
TAG, the comparator will qualify a match with the output of opcode tracking logic and a trigger occurs
before the tagged instruction executes (tagged-type trigger). Whilst tagging, the RW, RWE, SZE, and SZ
bits are ignored and the comparator register must be loaded with the exact opcode address.
If the TAG bit is clear (forced type trigger) a comparator match is generated when the selected address
appears on the system address bus. If the selected address is an opcode address, the match is generated
Содержание MC9S12XS128
Страница 4: ...S12XS Family Reference Manual Rev 1 13 4 Freescale Semiconductor ...
Страница 58: ...Device Overview S12XS Family S12XS Family Reference Manual Rev 1 13 58 Freescale Semiconductor ...
Страница 150: ...Memory Mapping Control S12XMMCV4 S12XS Family Reference Manual Rev 1 13 150 Freescale Semiconductor ...
Страница 168: ...Interrupt S12XINTV2 S12XS Family Reference Manual Rev 1 13 168 Freescale Semiconductor ...
Страница 194: ...Background Debug Module S12XBDMV2 S12XS Family Reference Manual Rev 1 13 194 Freescale Semiconductor ...
Страница 364: ...Periodic Interrupt Timer S12PIT24B4CV1 S12XS Family Reference Manual Rev 1 13 364 Freescale Semiconductor ...
Страница 396: ...Pulse Width Modulator S12PWM8B8CV1 S12XS Family Reference Manual Rev 1 13 396 Freescale Semiconductor ...
Страница 506: ...Voltage Regulator S12VREGL3V3V1 S12XS Family Reference Manual Rev 1 13 506 Freescale Semiconductor ...
Страница 736: ...Ordering Information S12XS Family Reference Manual Rev 1 13 736 Freescale Semiconductor ...
Страница 737: ......