13.07.2015 Views

MPLAB ICD 3 In-Circuit Debugger User's Guide

MPLAB ICD 3 In-Circuit Debugger User's Guide

MPLAB ICD 3 In-Circuit Debugger User's Guide

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Frequently Asked Questions (FAQs)• When using a 16-bit device, an unexpected reset occurred. How do Idetermine what caused it?Some things to consider:- To determine a reset source, check the RCON register.- Handle traps/interrupts in an <strong>In</strong>terrupt Service Routine (ISR). You should includetrap.c style code, i.e.,void __attribute__((__interrupt__)) _OscillatorFail(void);:void __attribute__((__interrupt__))_AltOscillatorFail(void);:void __attribute__((__interrupt__)) _OscillatorFail(void){INTCON1bits.OSCFAIL = 0; //Clear the trap flagwhile (1);}:void __attribute__((__interrupt__))_AltOscillatorFail(void){INTCON1bits.OSCFAIL = 0;while (1);}:- Use ASSERTs.• I have finished debugging my code. Now I’ve programmed my part, but itwon’t run. What’s wrong?Some things to consider are:- Have you selected the debugger as a programmer and then tried to program aheader board? A header board contains an -ICE/-<strong>ICD</strong> version of the device andmay not function like the actual device. Only program regular devices with thedebugger as a programmer. Regular devices include devices that have on-boardICE/<strong>ICD</strong> circuitry, but are not the special -ICE/-<strong>ICD</strong> devices found on headerboards.- Have you selected the debugger as a debugger and then tried to program a productiondevice? Programming a device when the debugger is a debugger will programa debug executive into program memory and set up other device featuresfor debug (see Section 2.7.1 “Sequence of Operations Leading to Debugging”).To program final (release) code, select the debugger as a programmer.- Have you selected “Release” from the Build Configuration drop-down list or Projectmenu? You must do this for final (release) code. Rebuild your project, reprogramthe device, and try to run your code again.• I didn’t set a software breakpoint, yet I have one in my code. What’s goingon?What you are seeing is a phantom breakpoint. Occasionally, a breakpoint canbecome enabled when it shouldn’t be. Simply disable or delete the breakpoint.© 2008 Microchip Technology <strong>In</strong>c. DS51766A-page 51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!