• AVR Freaks

Hot!Pickit 4 programming problem

Author
ysba
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2019/01/04 10:19:04
  • Location: 0
  • Status: offline
2020/06/01 07:40:46 (permalink)
5 (1)

Pickit 4 programming problem

Hi,
 
I'm facing some problems with Pickit 4 when programming a PIC24FJ128GA702 device. I'm sure it is not a hardware related issue because I've built a small test board only with ICSP signals as short as possible.
 
The problem is that the programmer stalls when I attempt to program the device with my application. My application has a bootloader program. I've divided the program memory in three parts: main program, bootloader transfer area, and bootloader program at the end. To do so I have changed the linker file to create these three sections.
 
If I remove the bootloader code from my source, with program memory formed by one area only, programming works fine with no problems. But when I put the bootloader in the compilation Pickit 4 stalls. Following is what the terminal shows. Here we see that the program memory is divided in four sections.
 
Message for Pickit 4 programming PIC24FJ128GA702 device:
Calculating memory ranges for operation...
 
Erasing...

The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x2fff
program memory: start address = 0xa080, end address = 0xa13f
program memory: start address = 0x14b80, end address = 0x14c3f
program memory: start address = 0x15000, end address = 0x15eff
configuration memory
Reception on endpoint 129 failed (err = -10121)
Programming did not complete.
A communication error with the debug tool has occurred. The tool will attempt to recover momentarily.

 
I'm pretty sure this problem is related to Pickit 4 combined with PIC24FJ128GA702 device because I have a Pickit 3 programmer and this problem do not occur. Also, I have another application which uses the very same bootloader technique but with another device (PIC24FJ128GA108) and with this other device Pickit 4 works fine.
 
Message for Pickit 4 programming PIC24FJ128GA108 device:
Calculating memory ranges for operation...

 Erasing...

 The following memory area(s) will be programmed:
 program memory: start address = 0x0, end address = 0x73ff
 program memory: start address = 0xa000, end address = 0xa3ff
 program memory: start address = 0x14c00, end address = 0x14fff
 program memory: start address = 0x15400, end address = 0x157f7
 configuration memory
 Programming/Verify complete
 2020-06-01 11:07:14 -0300 - Programming complete

 
 
I'm using MPLAB X IDE 5.40 (latest version). My PC is Intel Core i7-8550U CPU @1.80GHz 1.99GHz 8,00GB RAM, OS is Windows 10 always up to date.
 
I need some help with this issue. I'd like to know if there some bug or maybe I'm missing something obvious.
 
Thank you very much.
 
Cheers,
 
Yuri
 
 
 
#1
oliverb
Super Member
  • Total Posts : 285
  • Reward points : 0
  • Joined: 2009/02/16 13:12:38
  • Location: 0
  • Status: offline
Re: Pickit 4 programming problem 2020/06/01 07:45:54 (permalink)
0
Out of curiosity have you tried the IPE?
The IPE appeared to fill all unused memory, turning multiple blocks into one programming operation.
 
#2
ysba
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2019/01/04 10:19:04
  • Location: 0
  • Status: offline
Re: Pickit 4 programming problem 2020/06/01 07:48:23 (permalink)
0
Yes, IDE and IPE have the same behavior.
#3
NorthGuy
Super Member
  • Total Posts : 6173
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: Pickit 4 programming problem 2020/06/01 09:58:31 (permalink)
0
This is obviously some sort of bug. You should report it to Microchip by filing a support ticket.
#4
NKurzman
A Guy on the Net
  • Total Posts : 18782
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: Pickit 4 programming problem 2020/06/01 11:02:23 (permalink)
5 (2)
You may want to Try MplabX V5.35.  There are a lot of complaints about V5.40
If V5.35 works, include that in your support ticket.
#5
ysba
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2019/01/04 10:19:04
  • Location: 0
  • Status: offline
Re: Pickit 4 programming problem 2020/06/01 12:31:49 (permalink)
0
Thank you all for the tips.
 
I started this application using MPLAB X V5.25. I've got the following error:
 
Calculating memory ranges to program...
Erasing...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x20ff
program memory: start address = 0xa900, end address = 0xa9ff
program memory: start address = 0x15000, end address = 0x15eff
configuration memory
Verify failed.  [ Pgm ] at 0x0, expected 0x00040118, got 0x00000000
You have set the program speed to Normal. The circuit on your board may require you to slow the speed down. Please change the setting in the tool properties to low and try the operation again.
Programming did not complete.
 
 
Then I updated to V5.40 and got a different error (as described in my first post).
 
So I tried V5.35 as suggested, and it worked. So there was a bug in V5.25, which was corrected in V5.35, and another bug occured in V5.40.
 
I'll include this extra info in my support case. By now I'll keep working with V5.35.
 
Thank you all.
 
Cheers,
 
Yuri
#6
ysba
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2019/01/04 10:19:04
  • Location: 0
  • Status: offline
Re: Pickit 4 programming problem 2020/06/01 12:46:34 (permalink)
5 (1)
One more info, just for the records:
 
Program areas in V5.35 (works fine):
The following memory area(s) will be programmed:program memory:
start address = 0x0, end address = 0x20ff
program memory: start address = 0xa900, end address = 0xa9ff
program memory: start address = 0x15000, end address = 0x15eff
configuration memory

 
Program areas in V5.40 (Pickit 4 stalls):
program memory: start address = 0x0, end address = 0x20ff
program memory: start address = 0xa8c0, end address = 0xa97f
program memory: start address = 0x15000, end address = 0x15eff

 
The second area should start in 0xa900 and end at 0xa9ff. In the V5.40 logs, this code block is placed in position 0xa8c0 with no reason.
 
Cheers,
 
Yuri
post edited by ysba - 2020/06/01 12:48:23
#7
Jump to:
© 2020 APG vNext Commercial Version 4.5