• AVR Freaks

Hot!How to progrma/debug PIC32 Starter Kits with external programmers?

Author
iggardo
Starting Member
  • Total Posts : 24
  • Reward points : 0
  • Joined: 2013/07/13 07:03:47
  • Location: 0
  • Status: offline
2019/06/18 05:27:35 (permalink)
0

How to progrma/debug PIC32 Starter Kits with external programmers?

Hi.
The PIC32 Ethernet Starter Kit II includes a PIC24 based debugger/programmer hard-wired to the PIC32.
I'm unsuccessfully trying to program the demo board with an external programmer, using the expansion I/O board (DM320002).
I have tried using the RJ12 connector and the ICSP pins on J11 connector from DM320002.
Using Real ICE or Pickit3 I get always with same error message:
 
Target voltage detected
Unable to connect to the target device.
Failed to get Device ID
 
Using starter kit PKOB works fine.
 
I suspect the problem is the hard-wired on-board programmer, interfering with external device.
Can be the on-board debugger disabled?
 
Am I doing something wrong?
Could you advise me on the best way to get external programmer to work with PIC32 Ethernet Starter Kit II(DM320004-2)?
 
Regards.
#1

10 Replies Related Threads

    JPortici
    Super Member
    • Total Posts : 695
    • Reward points : 0
    • Joined: 2012/11/17 06:27:45
    • Location: Grappaland
    • Status: online
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/18 06:13:03 (permalink)
    0
    You can't.
    By looking at the schematic in the user manual the "debug" connector is to actually program the PKOB. The programming lines for the PIC32 are hardwired to the PKOB, in other boards you have jumper to select the PKOB or external program/debug
    #2
    iggardo
    Starting Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2013/07/13 07:03:47
    • Location: 0
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/18 07:17:25 (permalink)
    0
    According to the schematic, ICSP signals form Started kit DM320004-2 are routed to the expansion board, so there is a chance to program the PIC32 via external programmer.
    Looking at FIGURE A-6 from document DS70005169B, top right corner, there are two resistors R31,R37 that may be the solution...
     
    I will remove both resistors to isolate hard-wired programmer from ICSP lines...
     
    post edited by iggardo - 2019/06/18 07:18:28
    #3
    newfound
    Super Member
    • Total Posts : 1827
    • Reward points : 0
    • Joined: 2003/11/07 12:35:49
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/18 08:59:50 (permalink)
    0
    Make sure that you are using the external programmer as a "programmer" and not as a "debugger." A programmer can always use the alternate ICSP ports but a debugger requires the debug ICSP port to be programmed in the ICESEL bits in config words. The other thing that _may_ be of issue is that the PKOB is using JTAG and not two-wire ICSP. I doubt it myself and while I do not have the PIC32 starter boards I am able to program the MZ and MM curiosity boards with my own programmer (and much faster!) even though they have a PKOB chip. 
     
    Ok, I pulled the circuit diagram and it is not using JTAG so scrub that idea. However, it did remind me that there is only one /MCLR-VPP pin and this is shared for all ICSP ports. You will need to ensure that both VPP and VPP_GND are left "off" with the PKOB. you own programmer needs to be able to freely manipulate the MCLR pin to enter program mode.  
    #4
    iggardo
    Starting Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2013/07/13 07:03:47
    • Location: 0
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/18 10:03:04 (permalink)
    0
    newfound
    However, it did remind me that there is only one /MCLR-VPP pin and this is shared for all ICSP ports. You will need to ensure that both VPP and VPP_GND are left "off" with the PKOB. you own programmer needs to be able to freely manipulate the MCLR pin to enter program mode. 



    There is a resistor (R54) to unconnect VPP and VPP_GND from !MCLR/VPP_TARGET.
    I have remove all three 0 Ohm resistors:
    R31 - disconnect PGD2 signal from PKOB
    R37 - disconnect PGC2 signal from PKOB
    R54 - disconnect !MCLR/VPP_TARGET signal from PKOB
    still no luck...
     
    I don't know why the external programmer is not able of manipulating ICSP signals. May be I'm reading the schematic the wrong way sad
     
    any idea?
     
    Regards
    post edited by iggardo - 2019/06/18 10:41:02
    #5
    davekw7x
    Entropy++
    • Total Posts : 1769
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/18 14:34:47 (permalink)
    0
    iggardo
    ...
    I don't know why the external programmer is not able...
    any idea?



    I have no problems programming through the 6-pin ICSP connector on my unmodified Starter Kit I/O Expansion Board to my unmodified Ethernet Starter Kit II.
     
    Tried with PICkit3 and Snap.  All OK.
     
    Connection is through home-made  15-cm cable from a 6-pin header to an "RJ-12" type (telephone) plug with pins 1-5 connected to "straight-through" to pins 1-5.  Expansion Board is powered by an external 9 V power supply.  No USB connection.
     
    What kind of connection between uour external programmer and the Expansion Board connector do you have?  Are you able to check connectivity from pins on the programmer end to the pins of the 32MX?
     
    MPLABX version 5.15
     
    Regards,
     
    Dave
    post edited by davekw7x - 2019/06/18 14:46:57

    Sometimes I just can't help myself...
    #6
    dan1138
    Super Member
    • Total Posts : 3123
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/18 19:16:27 (permalink)
    0
    iggardo
    I have remove all three 0 Ohm resistors:

    R31 - disconnect PGD2 signal from PKOB

    R37 - disconnect PGC2 signal from PKOB

    R54 - disconnect !MCLR/VPP_TARGET signal from PKOB

    still no luck...

    Removing those resistors should have worked.

    That it failed suggests that the PIC32 Ethernet Starter Kit II (DM320004-2) is not made the way the schematic would indicate.

    With those resistors removed verify (with an ohm meter) that pins 1 to 5 of JP1 on the DM320002 I/O Expansion Board actually reach the PIC32MX795F512L-80I/PT chip on the DM320004-2 PIC32 Ethernet Starter Kit II board.

    If there are no issues with the connection try disabling the PKOB of the DM320004-2.




    post edited by dan1138 - 2019/06/18 19:39:18

    Attached Image(s)

    #7
    iggardo
    Starting Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2013/07/13 07:03:47
    • Location: 0
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/20 14:16:03 (permalink)
    0
    dan1138
    With those resistors removed verify (with an ohm meter) that pins 1 to 5 of JP1 on the DM320002 I/O Expansion Board actually reach the PIC32MX795F512L-80I/PT chip on the DM320004-2 PIC32 Ethernet Starter Kit II board.
    If there are no issues with the connection try disabling the PKOB of the DM320004-2.



    Thanks Dan for your clever suggestion. I will try tomorrow morning and let you know.
    #8
    iggardo
    Starting Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2013/07/13 07:03:47
    • Location: 0
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/06/21 11:01:13 (permalink)
    0
    Solved.
    After a while testing with the multi-meter, I found a faulty PCB trace on the expansion board.
    Remember, R31, R37 and R54 must be removed from starter kit.
     
    Thanks for the help guys!
     
     
     
    #9
    betta.sharma
    New Member
    • Total Posts : 8
    • Reward points : 0
    • Joined: 2019/05/28 11:08:17
    • Location: 0
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/07/15 11:04:02 (permalink)
    0
    Hi Iggardo, Which external tool did you use? Are you able to debug too?
    #10
    iggardo
    Starting Member
    • Total Posts : 24
    • Reward points : 0
    • Joined: 2013/07/13 07:03:47
    • Location: 0
    • Status: offline
    Re: How to progrma/debug PIC32 Starter Kits with external programmers? 2019/07/15 12:41:47 (permalink)
    0
    betta.sharma
    Which external tool did you use? Are you able to debug too?



    I was using REAL ICE for programming/debugging
    #11
    Jump to:
    © 2019 APG vNext Commercial Version 4.5