1
\$\begingroup\$

I made a design using PIC32mx and everything is working well. I was trying to debug my first program and for this case instead choosing PGEC1 and PGED1 I am using PGED2 and PGEC2. Problably that's the reason why I am getting the following message while debugging:

The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.

This is the schematic I have done:

PGC/PGD schematic

Where can I modify the configuration bits to enable the debug mode?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ The #pragma config sentence can be used to reassign PGC,PGD. The device-specific header contains all possible values, open it and search for 'config'. \$\endgroup\$ Jan 23 '16 at 20:28
2
\$\begingroup\$

The sentence to enable the debug mode for my case is:

#pragma config   ICESEL = ICS_PGx2 
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.