Skid Effect on Hardware Breakpoint of PIC MCUs

Last modified by Microchip on 2024/04/02 12:37

When a hardware breakpoint is used to halt the processor, one or more additional instructions may be executed before the processor halts. The number of extra instructions executed after the intended breakpoint is referred to as the skid.

The instruction where the break occurs will always execute completely and anything pending in the pipeline will execute as well. For single cycle instructions, this adds a one instruction skid. For multiple cycle instructions and branches, it adds multiple cycles.

The Skid Effect only affects hardware breakpoints on 8- and 16-bit architectures. Using single-stepping to reach a breakpoint will not produce a skid.

Example

In the example below, the breakpoint is set on line 27 of the disassembly window (line 36 of the C source window). This line of C code requires four assembly instructions to execute (lines 27-30).

  • Line 27 (where the break is set) must complete execution.
  • Line 28 will also be executed since it was already fetched into the pipeline.
  • Line 29 does not get executed.

Skid.png