Author Topic: PICKIT4 and PIC24 Problems  (Read 5004 times)

0 Members and 3 Guests are viewing this topic.

Offline Ground_LoopTopic starter

  • Frequent Contributor
  • **
  • Posts: 666
  • Country: us
PICKIT4 and PIC24 Problems
« on: March 22, 2020, 06:51:04 pm »
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 0x00000000
Programming 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.
954266-0
954270-1
« Last Edit: March 22, 2020, 06:54:46 pm by Ground_Loop »
There's no point getting old if you don't have stories.
 

Offline DrG

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: us
Re: PICKIT4 and PIC24 Problems
« Reply #1 on: March 22, 2020, 06:55:43 pm »
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.
- Invest in science - it pays big dividends. -
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3251
  • Country: ca
Re: PICKIT4 and PIC24 Problems
« Reply #2 on: March 22, 2020, 07:03:57 pm »
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.
 

Offline Ground_LoopTopic starter

  • Frequent Contributor
  • **
  • Posts: 666
  • Country: us
Re: PICKIT4 and PIC24 Problems
« Reply #3 on: March 22, 2020, 07:18:25 pm »
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.

Yep, that was it.  Went back and made those two connections and it downloaded fine.  Nice catch.
There's no point getting old if you don't have stories.
 

Online voltsandjolts

  • Supporter
  • ****
  • Posts: 2456
  • Country: gb
Re: PICKIT4 and PIC24 Problems
« Reply #4 on: March 23, 2020, 02:31:07 pm »
Is your workbench covered in mineral felt? :o
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3339
  • Country: gb
Re: PICKIT4 and PIC24 Problems
« Reply #5 on: March 23, 2020, 04:39:06 pm »
Is your workbench covered in mineral felt? :o

Looks like cork to me.
 

Offline Ground_LoopTopic starter

  • Frequent Contributor
  • **
  • Posts: 666
  • Country: us
Re: PICKIT4 and PIC24 Problems
« Reply #6 on: March 23, 2020, 09:08:10 pm »
Is your workbench covered in mineral felt? :o

It's a couple of cork tiles in the work area.
There's no point getting old if you don't have stories.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15447
  • Country: fr
Re: PICKIT4 and PIC24 Problems
« Reply #7 on: March 24, 2020, 03:45:32 pm »
Is your workbench covered in mineral felt? :o

It's a couple of cork tiles in the work area.

Yeah. I think someone's been drinking too much wine there and they won't admit it. :-DD
 

Offline azstevep

  • Newbie
  • Posts: 2
  • Country: us
Re: PICKIT4 and PIC24 Problems
« Reply #8 on: July 13, 2021, 09:11:45 pm »
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 0x00b340a3
Programming 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.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3251
  • Country: ca
Re: PICKIT4 and PIC24 Problems
« Reply #9 on: July 13, 2021, 10:25:38 pm »
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 0x00b340a3
Programming 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.

Yours 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 mode

Code: [Select]
#pragma BTMODE = 0x3
or BTMODE is not set at all

If this doesn't help

2. You can try to erase the chip then reboot and start over. Erasing removes partitioning.

If this doesn't help

3. 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.
 

Offline azstevep

  • Newbie
  • Posts: 2
  • Country: us
Re: PICKIT4 and PIC24 Problems
« Reply #10 on: July 13, 2021, 11:02:29 pm »
I have Single Boot configured

_FBOOT(BTMODE_SINGLE)

Per your suggestion, I erased flash and then I was able to program it.

Thanks!
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3530
  • Country: it
Re: PICKIT4 and PIC24 Problems
« Reply #11 on: July 14, 2021, 07:43:42 am »
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)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf