• AVR Freaks

Hot!Can program but not debug

Author
crosland
Super Member
  • Total Posts : 2041
  • Reward points : 0
  • Joined: 2005/05/10 10:55:05
  • Location: Warks, UK
  • Status: offline
2020/03/17 09:12:04 (permalink)
0

Can program but not debug

Specifically:
 

Script GetVersionDE failed with status Type = runScript, Script name = GetVersionDE, Status = 0xa00
.
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.

 
Everything worked yesterday with X 5.30
 
I've spent 3 hours so far trying to get it to work again. In desperation I upgraded to 5.35, to no avail.
 
Target is a 25K80 powered with 5V from a USB port, PK4 connected directly to appropriate pins, set for power from target.
 
I can program in X and the IPE, so I know the PGC/PGD connections and the target power are good.
 
The programmed device works as expected, so I know that the osc. config is correct (e.g. CAN bit rate timing is good).
 
That rules out the "most common causes".
 
I just cannot (today) get the debugger to work.
 
What are the "less common" causes?
#1

12 Replies Related Threads

    Jim Nickerson
    User 452
    • Total Posts : 6736
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: Can program but not debug 2020/03/17 09:32:36 (permalink)
    0
    If your device has more than one set of PGC/PGD and the config bits are not set to these I have found it can be programmed but not debugged

    Attached Image(s)

    #2
    crosland
    Super Member
    • Total Posts : 2041
    • Reward points : 0
    • Joined: 2005/05/10 10:55:05
    • Location: Warks, UK
    • Status: offline
    Re: Can program but not debug 2020/03/17 10:36:08 (permalink)
    0
    Well, just like my previous PK4 issues, it started working again all on its own.
     
    Initially I was programming (successfully) and then immediately trying to debug.
     
    The final step, as reported in my OP was to program the target, disconnected the PK4, checked the app was running correctly (e.g. CAN bit rate as mentioned). I didn't initially try debugging again after this.
     
    Now it will debug.
     
    @Jim Nickersen Thanks, but I haven't changed any config bits between working, not working.
     
     
    #3
    shahidatiq
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2017/03/11 13:38:25
    • Location: 0
    • Status: offline
    Re: Can program but not debug 2020/04/07 15:14:32 (permalink)
    0
    I am facing the same problem I am using PICkit4 to debug my DSPIC33FJ32GS606 using MPLAB X IDE v5.25. I am using PGC1, PGD1 for communication and the same is selected for debugging purpose. I am using FRC as a clock source. However, I am unable to debug. Following error appears
     
    The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.
     
    However, If I just program my controller, there is no problem and the controller is programmed with PICkit4 and works well for all applications. If I use the simulator option to debug my program, debugging is fine in simulator mode.
     
    Can you please help in this regards 
    #4
    ric
    Super Member
    • Total Posts : 28383
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Can program but not debug 2020/04/07 15:26:08 (permalink)
    5 (1)
    FRC may be too slow for debugging.
    (Debug mode involves a lot of communication between PIC and PC, running at the oscillator sped you have selected)
    Could you try it with a faster internal clock?
     
    post edited by ric - 2020/04/07 15:27:18

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #5
    shahidatiq
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2017/03/11 13:38:25
    • Location: 0
    • Status: offline
    Re: Can program but not debug 2020/04/07 15:30:45 (permalink)
    0
    I am using FRC with PLL enabled to operate the device (DSPIC33FJ32GS606) at 40 MIPs. 40~50 MIPs is the maximum speed of this device.
    #6
    mpgmike
    Super Member
    • Total Posts : 473
    • Reward points : 0
    • Joined: 2014/01/23 17:27:06
    • Location: NJ
    • Status: offline
    Re: Can program but not debug 2020/04/07 16:07:19 (permalink)
    0
    ric
    FRC may be too slow for debugging.
    (Debug mode involves a lot of communication between PIC and PC, running at the oscillator sped you have selected)
    Could you try it with a faster internal clock?

    Had that issue trying to debug a PIC16F18426 @1 MHz Fosc.  PORTC = 0x00 when clearly one of the pins were high. It worked in the real world, even pretended to debug, but the values all came up 0's.
     
    edited for typo
    post edited by mpgmike - 2020/04/07 16:08:54

    I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
    #7
    ric
    Super Member
    • Total Posts : 28383
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Can program but not debug 2020/04/07 16:12:09 (permalink)
    0
    shahidatiq
    I am using FRC with PLL enabled to operate the device (DSPIC33FJ32GS606) at 40 MIPs. 40~50 MIPs is the maximum speed of this device.

    ok, that won't be the problem then.
    I just wanted to point out that the instruction rate of the PIC is relevant during debugging.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #8
    awolfe
    Junior Member
    • Total Posts : 91
    • Reward points : 0
    • Joined: 2009/08/20 09:52:07
    • Location: Ashland, OH
    • Status: offline
    Re: Can program but not debug 2020/07/23 07:48:32 (permalink)
    0
    I am having the same problem with a PK4 and a PIC24FJ128GA406.  I have confirmed that the oscillator is running at 32MHz and I am using PGx1 pins.  I've tried various things like closing MPLAB, disconnecting/reconnecting PK4, cycling board power.  All to no avail.  Anyone else been able to track this down?
     
    I know I have debugged this board in the past, though it has been 1-2 months ago...

    A Wolfe
    #9
    KTrenholm
    Super Member
    • Total Posts : 788
    • Reward points : 0
    • Joined: 2012/08/08 14:04:23
    • Location: Connecticut, USA
    • Status: offline
    Re: Can program but not debug 2020/07/23 08:02:49 (permalink)
    0
    I had a similar issue yesterday with a PIC24FV15KM202 and it ended up being a problem with my Brown-Out Reset threshold bring set too high in the config bits (Vdd was lower than I was expecting and was tripping BOR).
     
    Probably not the reason for your problem awolfe, if like you say you have debugged this board previously without issue.  I know it's basic, but have you rebooted the whole PC yet?  Sometimes that shakes mchip tools back into working for me when they decide to make a nuisance of themselves for no particular reason.
    #10
    awolfe
    Junior Member
    • Total Posts : 91
    • Reward points : 0
    • Joined: 2009/08/20 09:52:07
    • Location: Ashland, OH
    • Status: offline
    Re: Can program but not debug 2020/07/24 09:14:17 (permalink)
    0
    Just a quick update... I dug out my ICD3 (I usually use the PK4 now).  The ICD3 starts in debug just fine.  Now back to doing work, not chasing my tail!

    A Wolfe
    #11
    A.T.
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2020/07/31 03:34:23
    • Location: 0
    • Status: offline
    Re: Can program but not debug 2020/08/02 22:43:23 (permalink)
    4 (1)
    I'm facing the same problem with my PK4 with PIC24FJ128GC006, earlier it was working fine the error just started when I used the same PK4 with an different PC with same board and same configuration bits. After i used it on my default PC it started showing this problem, I did not change the code or the configuration bits. Internally, I'm using FRC with PLL.
    #12
    ric
    Super Member
    • Total Posts : 28383
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Can program but not debug 2020/08/03 13:15:39 (permalink)
    0
    Is the other PC using a  later version of MPLABX?
    If yes, it has probably installed a later version of the PK4 firmware than your version knows how to use.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #13
    Jump to:
    © 2020 APG vNext Commercial Version 4.5