1
\$\begingroup\$

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,

\$\endgroup\$
  • \$\begingroup\$ Have you exceeded the maximum number of times you can reprogram the device? Try a new device. It might be getting borderline between failure and working... \$\endgroup\$ – Spoon Oct 27 '15 at 19:53
  • \$\begingroup\$ Or alternatively the calibration register for the oscillator should be non zero... I recall I had to make a note of it so it could be reprogrammed next time. Very Silly error message tho \$\endgroup\$ – Spoon Oct 27 '15 at 20:03
  • \$\begingroup\$ I'm using an external crystal so I don't think I need to configure the calibration register. However I'm new to the PIC24 world and will check the datasheet once more about this. In the meanwhile I got hold of a ICD3. I can program the µC without problems. But with the PICkit 3, the reprogram still fails if I didn't erase the part before. \$\endgroup\$ – Ulminpoika Oct 29 '15 at 7:19
1
\$\begingroup\$

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.

\$\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.