2.1.6.2 Code Location

The Code location feature enables the Data Visualizer to sample the Program Counter of the target device. This makes it possible to see what is being executed on the target at various sample points. It is especially useful together with power measurements to correlate code execution with power consumption. The sampled PC values will only show part of the code execution as in most cases it is impossible to read out the PC values as fast as the target is executing instructions. The sampled values are still useful to indicate which code segment is being executed at any point in time.

For an example on how to use the Code location feature, see Program Counter Polling.

Important: The Code location feature is only available on SAM devices and AVR devices featuring the UPDI debugging and programming interface.