PICKIT4 and PIC24 Problems - Page 1
Forum section: electronics / general

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: March 22, 2020, 06:51:04 pm
content: See setup in attached. I cannot get my PICKIT4 to download a program to either of the PIC24s shown below. I get verify failed: "Verify failed. [ Pgm ] at 0x0, expected 0x00040200, got 0x00000000Programming did not complete". I've tried powering from PICKIT, powering independent and changing speed. I followed the data sheet on power pin and MCLR setups. I have verified signals from PICKIT to 24F pins and both 24Fs seem to be unresponsive. I've done numerous searches and there doesn't appear to be a known issue with PICKIT4 and the 16 bit PICs. I did notice a firmware update go in just as I was making a first attempt, and just to be sure the PICKIT didn't fry I downloaded a program just fine to an 8-bit PIC. Any insights would be great. uC is PIC24FJ256DA206.

author: DrG
author_rank: Super Contributor
timestamp: March 22, 2020, 06:55:43 pm
content: It is only a shot, but I have had situations with PicKit3 like this (not with 4 so far) and it drove me mildly insane. Full power off, reboot and made a new project, pasted the old code into it and all was well. This is a problem I have read about. Don't know about the real cause other than the ubiquitous "corruption".It may be worth a shot.

author: NorthGuy
author_rank: Super Contributor
timestamp: March 22, 2020, 07:03:57 pm
content: Assuming you can read the device id Ok, the connection is correct. Look at the power: The ENVREG pin must be connected to VDD and 10 uF cap must be connected between the VCAP pin and ground.

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: March 22, 2020, 07:18:25 pm
content: Quote from: NorthGuy on March 22, 2020, 07:03:57 pmYep, that was it. Went back and made those two connections and it downloaded fine. Nice catch.

author: voltsandjolts
author_rank: Unknown
timestamp: March 23, 2020, 02:31:07 pm
content: Is your workbench covered in mineral felt?

author: mikerj
author_rank: Super Contributor
timestamp: March 23, 2020, 04:39:06 pm
content: Quote from: voltsandjolts on March 23, 2020, 02:31:07 pmLooks like cork to me.

author: Ground_Loop
author_rank: Frequent Contributor
timestamp: March 23, 2020, 09:08:10 pm
content: Quote from: voltsandjolts on March 23, 2020, 02:31:07 pmIt's a couple of cork tiles in the work area.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 24, 2020, 03:45:32 pm
content: Quote from: Ground_Loop on March 23, 2020, 09:08:10 pmYeah. I think someone's been drinking too much wine there and they won't admit it.

author: azstevep
author_rank: Newbie
timestamp: July 13, 2021, 09:11:45 pm
content: I have the same issue with programming a PIC24FJ256GA406 with PicKit4 and ICD4. In Low program mode I can get the same failure:Verify failed. [ Pgm ] at 0x15794, expected 0x00b3c0a3, got 0x00b340a3Programming did not complete.I have VCAP connected to 10uF cap to gnd and VBAT is pulled up to 3.3v with 1.5k.Any suggestions would be greatly appreciated.

author: NorthGuy
author_rank: Super Contributor
timestamp: July 13, 2021, 10:25:38 pm
content: Quote from: azstevep on July 13, 2021, 09:11:45 pmYours is far more complicated.This is a dual partition chip.If the chip is partitioned, 0x15794 is the address of the FSIGN configuration word. When the chip is programmed the flash controller clears bit 15 of FSIGN. Now, if you try to write to this location, bit 15 will remain clear.Your program doesn't seem to be partitioned, some of your code is written to 0x15794 (you have a big program if it reaches that far). This fail because bit 15 is zero. Looks like the programmer partitioned the PIC while you really didn't want that.1. Look at your project and make sure that FBOOT configuration word is set correctly to a single partiton modeCode:#pragma BTMODE = 0x3or BTMODE is not set at allIf this doesn't help2. You can try to erase the chip then reboot and start over. Erasing removes partitioning.If this doesn't help3. Perhaps there's a bug in tools which results in incorrect partitioning. Updating to newer version, as well as updating firmware in your programmers may help.

author: azstevep
author_rank: Newbie
timestamp: July 13, 2021, 11:02:29 pm
content: I have Single Boot configured_FBOOT(BTMODE_SINGLE)Per your suggestion, I erased flash and then I was able to program it.Thanks!

author: JPortici
author_rank: Super Contributor
timestamp: July 14, 2021, 07:43:42 am
content: Oh, by the way, MPLABX is unable to work on dual partition devices in dual partition modes since 5.40, and even with 5.35 4th gen tools (PICKIT 4) were extremely unreliable.I have to keep an ICD3 + MPLABX 5.35 installation to work on dual partition devices, which is really anooying.Numerous tickets, numerous useless answers, no solutions yet (though i was lucky wnough to find a support droid that was not braindead and really acknowledged the issue, but nothing came out of it anyway)