Datasheet
Frequently Asked Questions (FAQ)
2013 Microchip Technology Inc. DS52085A-page 87
9.4 GENERAL ISSUES
Q: Performing a Verify fails after programming the device. Is this a programming
issue?
A: If Run (Run>Run Project
) is selected, the device will automatically run imme-
diately after programming. Therefore, if your code changes the flash memory,
verification could fail. To prevent the code from running after programming,
please select 'Hold in Reset'.
Q: I have set a breakpoint but my program doesn't stop there. Why?
A: Consider the following:
1- Are you setting those breakpoint in Debug mode and then choosing Run?
Breakpoints are ineffective in Programmer mode.
2- Are these breakpoints part of a sequence? Remember, sequence breakpoints
will only halt execution if they are followed in the exact sequence.
3- Are these breakpoints part of PIC32 instruction trace triggers? Once you
choose them as trace triggers they are not functional breakpoints anymore. See
Section 7.3 “PIC32 Instruction Trace” for more information.
4- Are you seeing breakpoint skid? See next question.
5- Finally, your program may not have executed the instruction at which you wish
to break. Try setting a breakpoint earlier in your code and single step from there
to see the actual code flow executed by the device.
Q: I can't set a breakpoint on a particular line of code. Why?
A: MPLAB IDE will allow setting breakpoints only on executable code.
Example 1: The line you are trying to break on may have been optimized out by
the compiler. In that case, try turning optimizations off.
Example 2: The line you are trying to break on may be a compiler directive, and
not actual code.
Q: I didn’t set a breakpoint, yet I have one in my code. What’s going on?
A: What you are seeing is a phantom breakpoint. Occasionally, a breakpoint can
become enabled when it shouldn’t be. Simply disable or delete the breakpoint.
You may need to go to the disassembly window to do so, or simply right click and
choose delete all breakpoints. If this does not work, try closing and reopening the
disassembly window.
Q: Can I use the debugger with optimized code?
A: It is strongly recommended that C compiler optimization is turned off during
debugging (see the Build Options dialog). Optimization will greatly alter how the
executable code corresponds to the source files and hence the debugger may
appear to behave strangely with some code.
Q: Data capture has become flaky. What is going on?
A: The speed of data capture may be too high for your PC or target environment
(noise). There are several things you can do:
1- Reduce the clock speed. Refer to Section 11.3.3 “Clock”.
2- Reduce the rate at which you capture data. In the Watches window, right click
on the symbol, select “Run Time Update Interval” and set a delay.