![NXP Semiconductors MC9S08PA4 Reference Manual Download Page 361](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08pa4/mc9s08pa4_reference-manual_1721838361.webp)
18.3.2 Bus capture information and FIFO operation
The usual way to use the FIFO is to setup the trigger mode and other control options, then
arm the debugger. When the FIFO has filled or the debugger has stopped storing data into
the FIFO, you would read the information out of it in the order it was stored into the
FIFO. Status bits indicate the number of words of valid information that are in the FIFO
as data is stored into it. If a trace run is manually halted by writing 0 to ARM before the
FIFO is full (CNT = 1:0:0:0), the information is shifted by one position and the host must
perform ((8 - CNT) - 1) dummy reads of the FIFO to advance it to the first significant
entry in the FIFO.
In most trigger modes, the information stored in the FIFO consists of 16-bit change-of-
flow addresses. In these cases, read DBGFH then DBGFL to get one coherent word of
information out of the FIFO. Reading DBGFL (the low-order byte of the FIFO data port)
causes the FIFO to shift so the next word of information is available at the FIFO data
port. In the event-only trigger modes (see
), 8-bit data information is stored
into the FIFO. In these cases, the high-order half of the FIFO (DBGFH) is not used and
data is read out of the FIFO by simply reading DBGFL. Each time DBGFL is read, the
FIFO is shifted so the next data value is available through the FIFO data port at DBGFL.
In trigger modes where the FIFO is storing change-of-flow addresses, there is a delay
between CPU addresses and the input side of the FIFO. Because of this delay, if the
trigger event itself is a change-of-flow address or a change-of-flow address appears
during the next two bus cycles after a trigger event starts the FIFO, it will not be saved
into the FIFO. In the case of an end-trace, if the trigger event is a change-of-flow, it will
be saved as the last change-of-flow entry for that debug run.
The FIFO can also be used to generate a profile of executed instruction addresses when
the debugger is not armed. When ARM = 0, reading DBGFL causes the address of the
most-recently fetched opcode to be saved in the FIFO. To use the profiling feature, a host
debugger would read addresses out of the FIFO by reading DBGFH then DBGFL at
regular periodic intervals. The first eight values would be discarded because they
correspond to the eight DBGFL reads needed to initially fill the FIFO. Additional
periodic reads of DBGFH and DBGFL return delayed information about executed
instructions so the host debugger can develop a profile of executed instruction addresses.
Chapter 18 Development support
MC9S08PA4 Reference Manual, Rev. 5, 08/2017
NXP Semiconductors
361
Summary of Contents for MC9S08PA4
Page 1: ...MC9S08PA4 Reference Manual Supports MC9S08PA4 Document Number MC9S08PA4RM Rev 5 08 2017 ...
Page 2: ...MC9S08PA4 Reference Manual Rev 5 08 2017 2 NXP Semiconductors ...
Page 22: ...MC9S08PA4 Reference Manual Rev 5 08 2017 22 NXP Semiconductors ...
Page 28: ...System clock distribution MC9S08PA4 Reference Manual Rev 5 08 2017 28 NXP Semiconductors ...
Page 150: ...Port data registers MC9S08PA4 Reference Manual Rev 5 08 2017 150 NXP Semiconductors ...
Page 196: ...Human machine interfaces HMI MC9S08PA4 Reference Manual Rev 5 08 2017 196 NXP Semiconductors ...
Page 224: ...Instruction Set Summary MC9S08PA4 Reference Manual Rev 5 08 2017 224 NXP Semiconductors ...
Page 232: ...Functional Description MC9S08PA4 Reference Manual Rev 5 08 2017 232 NXP Semiconductors ...
Page 258: ...FTM Interrupts MC9S08PA4 Reference Manual Rev 5 08 2017 258 NXP Semiconductors ...
Page 294: ...Functional description MC9S08PA4 Reference Manual Rev 5 08 2017 294 NXP Semiconductors ...
Page 398: ...Resets MC9S08PA4 Reference Manual Rev 5 08 2017 398 NXP Semiconductors ...
Page 400: ...MC9S08PA4 Reference Manual Rev 5 08 2017 400 NXP Semiconductors ...