J-Trace overflow error

From SEGGER Wiki
Jump to: navigation, search

Under certain circumstances when using a J-Trace Pro the software may indicate that an overflow happened or that unknown trace packets were detected. This article will describe which scenarios are possible and how this can be prevented.

Possible error messages

The following error messages can appear under certain circumstances:

  1. Trace overflow detected <Offset>. Trace packets may have been lost.
  2. J-Trace sends trace data faster than J-Link software can analyze it, <n> data had to be discarded. Stopping streaming trace.
  3. Unknown trace data packet detected

1: Is shown when the target device creates more trace data that can be send out via the trace pins. Should you be using less than 4 trace data pins, enable all 4 trace data pins to achieve maximum bandwidth. If you still get this error the CPU clock must be lowered while the trace clock speed stays high. Arm instruction trace specifies that the maximum CPU clock speed should be twice as high as the trace clock speed. Any setup outside of this specification might lead to overflows.

2: In this case the incoming trace data stream is overwhelming the host PC analyzer. This can happen on target devices that use the ETMv4 revision as it adds a more complex compression to the trace data which additionally put a load on the host PC. To work around this you will either need a faster host PC or the CPU clock speed must be lowered so the target device creates less trace data.

3: This error message indicates that there is a signal integrity issue between the target device and J-Trace Pro. If it is a signal issue in the time domain of the signal it can be fixed by adjusting the sampling timing of the J-Trace Pro as explained here. Should that not help it might also be a amplitude related issue. In that case the board design should be revisited. As reference design we recommend to use the SEGGER Cortex-M Trace Reference board. For measuring the quality of the trace signals we recommend to use a capable oscilloscope with active probes.