PICkit 3 requires device erase in IPE before programming in MPLAB-X

mplabxpicpickit

I'm seeing a new behavior of my PICkit 3 that I did not have before. I hope someone can point me to a direction, it seems that I either messed with some MPLAB-X configurations, or my PICkit 3 is simply broken.

Device: PIC24FV16KM204
MPLAB-X: 1.90

During firmware development I usually could just program my device at any time after I made some changes to the firmware. I could also debug my project at any time. Now the PICkit 3 always returns the error message "Failed to program device" when the device is not empty. So after each Firmware change, I'm currently closing MPLAB-X, starting the IPE, erasing the device and finally restarting MPLAB-X. Then I can successfully program the controller without error message.

What I have checked so far:

  • The project properties / Config PICkit3 / Program Options have a default setting for erasing everything before a new programming.
  • My configuration bits in the firmware disable the write protections (FBS and FGS)

This is the output of the PICkit 3:

Connecting to MPLAB PICkit 3...
Firmware Suite Version.....01.29.08
Firmware type..............dsPIC33F/24F/24H

Target detected
Device ID Revision = 0

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0xbff
configuration memory

Programming...
Calibration memory
Address: 0 Expected Value: 0 Received Value: 0
Failed to program device

Any hints are greatly appreciated. Regards,

Best Answer

These problems tend to be hardware related.

  1. Do all the power inputs have decoupling capacitors.
  2. Is there enough bulk capacitance on the board.
  3. How long are the programming wires.
  4. What is powering the board.

Powering the target board with the pickit3 is usually a recipe for trouble. The ICD3 is a bit more heavy duty than the pickit3 both in power regards and in how much load the data pins can tolerate.

It's also possible that the pickit3 is failing. Microchip will warranty the programmer for free.