Reliability issues with Digilent MAX32 and Microchip PICKIT3

The Digilent MAX32 PIC-based development board can be programmed and debugged with Microchip’s PICKIT3 programmer, and together these make a low cost and powerful solution for microcontroller development.

However I did come across a problem. In my setup the MAX32 is powered with my bench power supply, so the PICKIT3 does not to power the target hardware (an option in MPLAB - it has to be this way as there is no way to disable the onboard regulators on the MAX32, and they will not like being externally powered). About half the time, programming the MAX32 would fail with a message like “Unable to connect to target device. Failed to get Device ID.” or simply “Failed to program device”.

I noticed another odd thing. My bench supply showed that the MAX32 normally draws about 100mA, but after programming, the current went up to about 250mA - and stayed there. I could understand current going up during programming - but once it is done, I would expect it to drop to back to 100mA.

MAX32 with PICKIT3

Searching online showed that this seems to be a common issue with PICKIT3 and various hardware. Some people reported fixing it by replacing the interconnect cable, suspecting a bad connection.

But for me, taking the cable out of the circuit and soldering the pin header that connects to the PICKIT3 directly to the MAX32 (thus making connections as short and reliable as possible) did not help.

Looking at the signals going between the two devices, I noticed that the 3.3V rail, present on the connector going to the PICKIT3, was fine on power up, but showed signs of instability after programming. Small peaks, about 0.5V high at around 100kHz appeared. Once they were there, they stayed there, regardless of what happened.

The 3.3V regulator on the MAX32, normally stable, was atrting to oscillate with the PICKIT was connected. For some reason, it did not happen straight away - only when programming is attempted. Whatever is at the other end of that 3.3V line on the PICKIT, some kind of semiconductor switch perhaps, was presenting a nasty enough load to set it off. Once it starts, it does not stop. From experience, this is quite typical for circuits that have stability issues.

I tried soldering a 100nF cap from pin 2 (GND) to pin 3 (+3.3V) on JP11, the connector for the PICKIT3, which improved things - now the error happened about every 5 or 6 times. The scope showed that oscillation was reduced, but still there. Adding a 10uF cap stopped oscillation completely, and now the error never occurs. Supply current was now stable at 100mA, as well.

(You can just see the cap in the photo above. The positive terminal goes to pin 2, the negative to pin 3.)

Even with digital circuits - it is an analogue world ...