• AVR Freaks

Hot!Error : The target device is not ready for debugging

Author
sagar
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2018/01/18 03:34:40
  • Location: 0
  • Status: offline
2018/05/08 06:43:07 (permalink)
0

Error : The target device is not ready for debugging

Hi,
 I am getting this error when I will try debug the code in MPLAB X(XC32) for PIC32MX575F256L &  PIC32MX795F512L. Also when I will try to download the code, it downloads successfully but it will not run. 
 
Programming/Verify complete
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.
 
Please let me know the solution. 
#1

6 Replies Related Threads

    qɥb
    Monolothic Member
    • Total Posts : 3332
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: offline
    Re: Error : The target device is not ready for debugging 2018/05/08 13:22:40 (permalink)
    0
    The most obvious solution is to check what it tells you to.
    Do you have  valid clock selection to make your chip run?
    Have you selected the debug pins that your debugger us actually connected to?
     
    You have not mentioned which debug pins you are using, or shown how you are setting any of the PIC's CONFIG registers, so we can only guess what your problem might be.
     
     

    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #2
    RISC
    Super Member
    • Total Posts : 5381
    • Reward points : 0
    • Status: offline
    Re: Error : The target device is not ready for debugging 2018/05/08 15:59:22 (permalink)
    #3
    elberto
    Super Member
    • Total Posts : 499
    • Reward points : 0
    • Joined: 2005/05/18 06:35:17
    • Status: offline
    Re: Error : The target device is not ready for debugging 2018/06/09 04:46:04 (permalink)
    0
    Hi guys, I try to write here avoiding opening new discussion...
    I can't enter in debug mode while I can correctly program device.
    MPLAB X 4.15
    XC16 1.32
    PIC24F04KA200
     
    I'm migrating from PIC24F04KL101 where I was running using FRC oscillator.
     
    Here my configuration bits for PIC24F04KA200:
     
     


    // oscillator 8MHr FRC
    #pragma config FNOSC = FRC

    // primary oscillator disabled
    #pragma config POSCMOD = NONE // Primary Oscillator Configuration bits (Primary oscillator disabled)
    #pragma config MCLRE = ON // MCLR Pin Enable bit (MCLR pin enabled; RA5 input pin disabled)
    #pragma config OSCIOFNC = ON // CLKO Enable Configuration bit (CLKO output disabled)

    // FICD
    #pragma config ICS = PGx3 // Reserved (PGC3/PGD3 are used for programming the device)
     
     
    int main(void)
    {
        OSCCONbits.SOSCEN = 0;  // secondary oscillator disabled
       
        AD1PCFG = 0xFFFF;   // tutti i pin digitali?
        
        // uscita IGBT
        LATBbits.LATB15 = 0;
        TRISBbits.TRISB15 = 0;
        
        
        // spengo i led
        LATBbits.LATB8 = 0;
        LATBbits.LATB9 = 0;
        
        TRISBbits.TRISB8 = 0;
        TRISBbits.TRISB9 = 0;
     

     
     
    I already checked hardware connections and YES, I'm correctly using PGx3 (pins 6,7).
    So.... what's wrong with my configuration bits?
    #4
    RISC
    Super Member
    • Total Posts : 5381
    • Reward points : 0
    • Status: offline
    Re: Error : The target device is not ready for debugging 2018/06/09 05:25:26 (permalink)
    0
    Hi,
    Did you connect all ICSP signals (5) to the ICSP connector ?
    What is your Vdd voltage ?
    Which debug tool do you use ?
    Regards
     
    #5
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re: Error : The target device is not ready for debugging 2018/06/09 05:31:11 (permalink)
    0
    yep, he says he can program device - just not debug

    GENOVA :D :D ! GODO
    #6
    boatbodger
    Starting Member
    • Total Posts : 70
    • Reward points : 0
    • Joined: 2011/03/27 15:39:07
    • Location: 0
    • Status: offline
    Re: Error : The target device is not ready for debugging 2020/02/14 09:48:38 (permalink)
    0
    For what it's worth, the PIC32MZ...DAR176 PCB I designed has ICS_PGx1 connected to the programming socket.
    It programs perfectly but I could not debug it.
    After a bit of digging, I found to my surprise that - un-asked - Harmony 3 chose to configure the project with ICS_PGx2 by default.  
    Manually forcing it to use ICS_PGx1 (Harmony sets this in 'initialization.c') now allows me to debug it.
     
    #7
    Jump to:
    © 2020 APG vNext Commercial Version 4.5