Emulator Troubleshooting

If you are having problems with MPLAB® REAL ICE™ In-Circuit Emulator operation, start here.

The Five Questions to Answer First

  1. What device are you working with? Often an upgrade to a newer version of MPLAB X IDE is required to support newer devices.
  2. Are you using a Microchip demo board or one of your own designs? Have you followed the guidelines for resistors/capacitors for communications connections? See "Emulator Operation".
  3. Have you powered the target? The emulator cannot power the target.
  4. Are you using a USB hub in your set up? Is it powered? If you continue to have problems, try using the emulator without the hub (plugged directly into the PC).
  5. Are you using the standard communication cable (RJ-11) shipped with an emulator? If you have made a longer cable, it may have communications errors. If longer cables are required, you should consider using high-speed communications. See "Performance Pak for the MPLAB REAL ICE In-Circuit Emulator User’s Guide".

Top Reasons Why You Can’t Debug

1. Oscillator not working.

Check your Configuration bits setting for the oscillator. If you are using an external oscillator, try using an internal oscillator. If you are using an internal Phase-Locked Loop (PLL), make sure your PLL settings are correct.

2. No power to the target board.

Check the power cable connection.

3. Incorrect Vdd voltage.

The Vdd voltage is outside the specifications for this device. See the device programming specification for details.

4. Physical disconnect.

The emulator has somehow become physically disconnected from the PC and/or the target board. Check the communications cables’ connections.

5. Communications lost.

Emulator to PC communications has somehow been interrupted. Reconnect to the emulator in MPLAB X IDE.

6. Device not seated.

The device is not properly seated on the target board. If the emulator is properly connected and the target board is powered, but the device is absent or not plugged in completely, you may get the message:
Target Device ID (0x0) does not match expected Device ID (0x%x)
where %x is the expected device ID.

7. Device is code-protected.

Check your Configuration bits setting for code protection.

8. No device debug circuitry.

You are trying to debug a production device that does not have debugging capabilities. Use a debug/emulation header instead. (See "Processor Extension Paks and Debug Headers" or "Emulation Extension Paks and Emulation Headers".)

9. Application code corrupted.

The target application has somehow become corrupted or contains errors. Try rebuilding and reprogramming the target application. Then initiate a Power-On-Reset of the target.

10. Application code runs but does not debug.

If your application debug builds and runs but does not debug (no halt arrow in gutter, broken breakpoint, etc.), the source files may not be able to be located. Check your path and file names for non-ANSI characters or a length that is too long (See MPLAB X IDE documentation for path, file, and folder restrictions).

11. Incorrect programming pins.

You do not have the correct PGC/PGD pin pairs programmed in your Configuration bits (for devices with multiple PGC/PGD pin pairs).

12. Additional setup required.

Other configuration settings are interfering with debugging. Any configuration setting that would prevent the target from executing code will also prevent the emulator from putting the code into Debug mode.

13. Incorrect brown-out voltage.

Brown-Out Detect voltage is greater than the operating voltage Vdd. This means the device is in Reset and cannot be debugged.

14. Incorrect connections.

You have not followed the guidelines in "Emulator Operation".

Other Things to Consider

  1. Use the Loopback Test board to verify that the emulator itself is functioning correctly (Loopback Test board).
  2. There may be a problem programming in general. As a test, switch to Run mode (Run > Run Project) and program the target with the simplest application possible (e.g., a program to blink an LED). If the program will not run, then you know that something is wrong with the target setup.
  3. It is possible that the target device has been damaged in some way (e.g., over current). Development environments are notoriously hostile to components. Consider trying another target device.
  4. Review emulator debug operation to ensure proper application setup (see "Emulator Operation".)
  5. If the problem persists contact Microchip Support.
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.