Cannot connect to PIC32MZ2048EFM100 via ICSP

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Cannot connect to PIC32MZ2048EFM100 via ICSP

    Hello,

    I' ve got problem with programming PIC32MZ2048EFM100 by J-Link Commander via ICSP.
    I also tried to program via J-Flash Light. What is strange I tried to erase PIC many times and only one time it has ended with success and about 20 times with an error.
    I attach the screenshot from J-Link Commander.

    Best regards.
    Images
    • Przechwytywanie.PNG

      24.03 kB, 527×483, viewed 116 times
  • Hello,

    Thank you for your inquiry.
    Such an issue is not known to us.
    Are you using an eval board or custom hardware?
    Did you have a working setup before?
    What J-Link software version were you using then?
    Are you using an external J-Link or an OB?
    Could you attach schematics that show the debug connection between J-Link and target device?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us

  • Hi,

    I'm using custom hardware.
    J-Link works fine with MK24 Kinetis MCU on the same board.
    I'm using external J-Link (version 10.1) with newest firmware: 6.22d.
    I've connected J-Link to the device as it is shown on scheme of the Microchip Adapter -
    TMS -> ICSPData
    TCK -> ICSPClk
    GND -> GND
    VTREF -> VDD
    #RESET -> #MCLR

    I attached schema of the Microchip Adapter.

    After connecting via MPLAB IDE (3.65) it returns:
    Connecting to JLink Probe...
    Connection Failed
    MPLABComm returned an error code of -406, System (Linux/OSX errno.h) error value 106.


    Best regards,
    Patryk
    Images
    • microchip_adapter.PNG

      47.1 kB, 843×481, viewed 133 times
  • Hi,

    I didn't add pull-up resistors to TMS and TCK signals at firsts.
    Now I added 10kΩ pull-up resistorto TMS and TCK.

    At the beginning it worked. I was able to erase PIC, but when I'm trying to do this again attached statement shows.

    Best regards,
    Patryk
    Images
    • screen.PNG

      31.47 kB, 618×631, viewed 100 times

    The post was edited 1 time, last by Giteh ().

  • Hello Patryk,

    We just tried to reproduce the issue but could connect to a PIC32MZ2048EFM100 via ICSP just fine.
    So the issue is most likely related to a setup problem on your hardware.
    The schematics you provided are simply taken from the Microchip Adapter Schematic: segger.com/products/debug-prob…apters/microchip-adapter/
    That is not what I asked for. Could you post the schematics of the debug interface on *your* custom hardware that shows how the ICSP debug connector is connected to the target device (PIC32)?

    Are you using the Microchip Adapter sold by SEGGER to connect to J-Link?
    Which of the connectors are you using? The 14-Pin MIPS or RJ12?
    The error message claims that TDO is pulled high. Is this the case on your setup?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us

  • Hello Nino,

    I attache schematic which shows how the ICSP debug connector is connected to the target device, but please notice that as I told in post number 4 I added pull-up resistors (10kΩ) to the lines TMS and TCK.
    I added pull-ups due to interface description which I also attache.
    After that statement of the J-Link Commander have changed.

    What is strange J-Link Commander said that TDO pin is constant high, but I didn't connect this pin at all.

    Could You tell mi something more about those pull-ups?
    Is that connection correct?

    Best regards,
    Patryk
    Images
    • pic32mz_cut.PNG

      100.57 kB, 637×713, viewed 97 times
    • pull_ups.PNG

      172.52 kB, 1,082×758, viewed 105 times
  • Hello Patryk,

    Do you have an Microchip eval board to test your setup against?
    Generally we suggest first getting a running eval board setup and then design custom hardware based on that.

    For reference for our testing we used an Explorer 16 Development Board.
    First verify functionality with an eval board.
    Then see how the eval board has wired the ICSP connector and copy that design.
    That should do the trick.

    Please understand that we can't put more time in this case as there is no issue with J-Link or the ICSP interface but exclusively a custom hardware issue.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us

  • Hello Nino,

    I've tried to do follow your advice, but it didn't worke.

    I used Michrochip eval board: "PIC32MZ Starter Kit".
    First I used USB debug to erase chip on the board and it worked fine every time I tried it.

    Then I tried to erase with J-Link and J-Link Commander.
    First I removed JP2 Jumper,
    as it is said in "PIC32MZ Embedded Connectivity with Floating Point Unit (EF) Starter Kit User’s Guide"

    When I tried it for the first time it worked but each next try failed.

    I've connected J-Link to the board in the same way as before.
    I attached photos which show how I've connected J-Link to the eval board.

    Also I want to say that my custom board works fine without any problems with RealICE and ICD3.

    Best reagards,
    Patryk
    Images
    • IMG_8284.jpg

      74.69 kB, 1,024×768, viewed 75 times
    • IMG_8288.jpg

      202.44 kB, 1,024×768, viewed 82 times
    • IMG_8291.jpg

      205.09 kB, 1,024×768, viewed 74 times
  • Hello Patryk,

    I used Michrochip eval board: "PIC32MZ Starter Kit".

    Unfortunately most Microchip OB debug chips have bugs when trying to use external debug probes.
    It will trigger random chip resets and other signals even when JP2 is removed.
    What might work is to desolder the OB completely from the board to make sure it does not interfere with the debug probe.

    To avoid this issue I recommended using the Explorer 16 Development Board and our Microchip adapter.
    Attached is a successful connect to the device. Erase, reset, write, read etc. all work as well.

    So as I said before this is no J-Link issue but strictly a hardware related one. Compare your hardware to the Explorer 16 board and try to mimic the debug connection.
    For more information about the Microchip hardware contact Microchip support.
    From our side everything is working as intended.

    Best regards,
    Nino
    Images
    • Capture.PNG

      26 kB, 677×498, viewed 96 times
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us

  • Hello Nino,

    I follwed Your instructions and I bought Microchip Adapter sold by SEGGER and Explorer 16 Development Board.
    But J-Link failed.

    I tried to erase microcontroller in Explorer with Real ICE and it worked just fine.
    I also tried to erase Kinetis microcontroller with J-Link and it also worked just fine.

    I attache pictures which show how I've connected J-Link to the Explorer and results of my attemps.

    Best regards,
    Patryk
    Images
    • IMAG0245.jpeg

      100.17 kB, 1,056×784, viewed 90 times
    • IMAG0246.jpeg

      77.43 kB, 1,056×784, viewed 99 times
    • jlink.png

      5.94 kB, 147×106, viewed 205 times
    • realice.png

      10.19 kB, 205×194, viewed 107 times
    • jlink_kinetis.png

      10.03 kB, 148×174, viewed 105 times
  • Hello Patryk,

    Thank you for providing the screen shots.
    I just retested the same setup you are using and everything was working as expected.
    But I noticed one difference on your board I believe (unfortunately it is hard to see on the pictures you provided).
    There is a little switch next to the display marked <-PIC-PIM->. This needs to be in PIM position for the adapter to work. In PIC position I get the same error you see.

    Does putting the switch in the right position resolve the issue?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us

  • Hello Patryk,

    has the issue resolved in the meantime or does a connect still not work?
    If not we could offer to take a look on your setup. For this you would need to send in your complete setup so we would have a reproduction scenario.
    Because currently without reproduction there is not much we can do here.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us

  • Hello,

    This issue is being handled further per e-mail.
    The thread will be closed now.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    The following contact form can be used for this: Contact Us