Hot!PIC24FJ256GA705 and 704 - slow programming

Author
jarin
Super Member
  • Total Posts : 827
  • Reward points : 0
  • Joined: 2005/05/23 13:50:02
  • Status: offline
2017/10/02 10:48:26 (permalink)
3 (1)

PIC24FJ256GA705 and 704 - slow programming

I'm using both PIC24FJ256GA705 on respective Curiosity board and PIC24FJ256GA704 on my own PCB and ICD3. On both of them I experience annoyingly long programming time. My devtool setup is XC16 1.32 on MPLABX 4.01, running on up-to-date x64 Win7 professional, on Intel i7 with 8G of RAM.
It takes one second from clicking "Program" to build the code, then it connects to programmer in another two seconds, then it does nothing obvious for 15-20 seconds and just then the part is programmed in six seconds on Curiosity board. Similar times do apply for PIC24FJ256GA704 programmed by ICD3 on my own board, perhaps few seconds shorter.
I uploaded video here - XXX forum doesn't allow me to post video link, how awesome XXX - it shows how sluggishly it works on Discovery board.
The MPLABX tools are the fastest around, but waiting half a minute to flash 135 bytes of empty program (yielding 4,5B/s flashing speed) seems too much in 21st century. I tried the same process in IPE, but the process is as slow as with IDE.
I have option "Maintain active communication with hardware tool" checked and active. It is much worse without.
 
Does anyone have similar experience? Is there something I can try?
 
 
***************************************
EDIT:
The video is here
www. youtube.com/watch?v=jaF39LUutnc
please, remove the space after www.
post edited by jarin - 2017/10/02 10:51:02

Jaromir Sukuba, Bratislava, Slovakia
http://jaromir.xf.cz/  - open source PIC18 debugger.
#1

14 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 6262
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2017/10/02 15:16:54 (permalink)
    +2 (2)
    Yep, posting links often falls over, but there's a hidden "PGD" code to embed videos directly...
     

    #2
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2645
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2017/10/02 16:50:29 (permalink)
    0
    I've got a font that goes into const psv, that slows it down.
     
    Check the output.
    That's go to be erased.
    program memory: start address = 0x0, end address = 0x157ff.

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #3
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2017/10/02 23:41:44 (permalink)
    +1 (1)
    There are no fonts or whatever. Just main function with empty endless loop. The resulting binary only takes 135 Bytes of FLASH. I thought it's obvious from the video, that's why I didn't include the source file of project.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #4
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2645
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2017/10/03 07:15:50 (permalink)
    0
    Have you tried it with a pickit?

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #5
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2017/10/03 07:23:00 (permalink)
    +1 (1)
    PK3 provides the same speed as Curiosity kit - no surprise here, as Curiosity has cut-down PicKit3 on board.
    ICD3 is just marginally faster than that.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #6
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2017/10/04 11:42:43 (permalink)
    +1 (1)
    I just tried the same thing on computer with Linux Mint 18.2, as Linux machines are known to work better with MPLABX and other java monsters better than Windows. This situation seems to have different root cause, so not surprisingly, it's the same as in Windows.
    I strongly believe this is some kind of bug MPLABX, and will try to open support ticket.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #7
    Gort2015
    Klaatu Barada Nikto
    • Total Posts : 2645
    • Reward points : 0
    • Joined: 2015/04/30 10:49:57
    • Location: 0
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2017/10/04 13:46:10 (permalink)
    0
    When you write to your mpu it compiles the code, erases then writes.
    The write time seems ok, a few seconds.
     

    MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
    https://www.youtube.com/watch?v=Iu1qa8N2ID0
    + ST:Continues, "What Ships are Made for", Q's back.
    #8
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2018/03/14 02:36:27 (permalink)
    0
    The situation is the same with 4.05 and 4.15 releases.
    Roughly 25 seconds to erase and program 135B of code into PIC24FJ256GA705.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #9
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2018/04/10 22:12:50 (permalink)
    +1 (1)
    I'm discussing this issue with Microchip support.
    It's been four weeks since opening the case, so far, they were able to replicate this slow programming, though it goes rather slow, at rate roughly one comment per week or two. Somehow it reminds me correspondence chess with a person on other side of Earth.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #10
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2018/05/03 03:56:03 (permalink)
    +1 (1)
    Update from Microchip support - they are aware now of the problem and will improve the situation in undisclosed future. I didn't feel brave enough to push it any further, so I closed the case.
     
    I'll avoid this family of PIC devices in the meantime.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #11
    NorthGuy
    Super Member
    • Total Posts : 4929
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2018/05/03 07:40:24 (permalink)
    0
    Many people have contacted us asking if our programmer can program these chips any faster than PICkit3.
     
    Perhaps it is related to the silicon bug. PGEC2/PGED2 pair on these devices is not functional. Perhaps PICkit3 tries to work around.
     
    http://www.northernsoftware.com/dev/pic24fj/pic24fj256ga702.htm
     
    Do you use PGEC2/PGED2?
    #12
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2018/05/04 03:10:55 (permalink)
    0
    I'm using PGED1/C1 pair on my own board. Curiosity board uses PGED2/C2 pair, but in both cases I get the same results. I can't find any errata related to this in PIC24FJ256GA705 errata list, though. I remember older PIC24xxGA004 having errata with non-functional PGD/PGC pair, AFAIK it was un-workaroundable.
     
    This page seems to be more related to my problem http://www.northernsoftwa...fj/pic24fj256ga705.htm
    Heck, 5,5s for full program and verification. MPLABX programming is really sluggish in comparison, few seconds connecting to programmer, then 20s of nothing and then 2s of actual job.
    On the other hand, PIC24FJ128GA006 are programmed much faster in MPLABX, like few seconds of connecting, then few seconds of programming and done, without the 20s of waiting in between. That is why I opened the support case and it took one month to explain them that programming any amount of code (135B in this particular case) in 25s is just wrong.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #13
    NorthGuy
    Super Member
    • Total Posts : 4929
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2018/05/04 06:48:20 (permalink)
    0
    jarin
    I'm using PGED1/C1 pair on my own board. Curiosity board uses PGED2/C2 pair, but in both cases I get the same results.



    The PGED2/PGEC2 pair is multiplexed with JTAG pins, which produces interference with SPI, thus the programming executive cannot function. May be PICkit3 works around by using serial execution mode to program, but it's much slower than the executive.
     
    #14
    jarin
    Super Member
    • Total Posts : 827
    • Reward points : 0
    • Joined: 2005/05/23 13:50:02
    • Status: offline
    Re: PIC24FJ256GA705 and 704 - slow programming 2018/05/04 16:44:53 (permalink)
    0
    Serial execution mode - unless driven at unreasonably low clock rate - can't explain 4,5B/s (135B per 25s) programming speed. Your programmer declares roughly 46kB/s, ten thousand times as much. That is very reasonable number. 4,5B/s isn't.
    Other than that, this could be Curiosity board problem, but not much for custom board, using different PGD1/PGC1 pair with PK3 or ICD3, yet having the same symptoms as Curiosity board.
     
    MPLABX is common denominator here, even Microchip confirmed this behavior and declared they will improve the programming speed in undisclosed future. Considering it took two months just to confirm this issue, I'm not holding my breath.

    Jaromir Sukuba, Bratislava, Slovakia
    http://jaromir.xf.cz/  - open source PIC18 debugger.
    #15
    Jump to:
    © 2018 APG vNext Commercial Version 4.5