Saturday, April 21st 2018, 12:23am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

1

Monday, January 8th 2018, 11:59am

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.
Giteh has attached the following image:
  • Przechwytywanie.PNG

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 938

2

Tuesday, January 9th 2018, 9:46am

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 purposes 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: https://www.segger.com/about-us/contact-us/


Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

3

Tuesday, January 9th 2018, 11:27am

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:

Quoted

Connecting to JLink Probe...
Connection Failed
MPLABComm returned an error code of -406, System (Linux/OSX errno.h) error value 106.


Best regards,
Patryk
Giteh has attached the following image:
  • microchip_adapter.PNG

Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

4

Tuesday, January 9th 2018, 2:42pm

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
Giteh has attached the following image:
  • screen.PNG

This post has been edited 1 times, last edit by "Giteh" (Jan 9th 2018, 2:49pm)


SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 938

5

Wednesday, January 10th 2018, 4:05pm

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: https://www.segger.com/products/debug-pr…rochip-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 purposes 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: https://www.segger.com/about-us/contact-us/


Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

6

Friday, January 12th 2018, 12:14pm

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
Giteh has attached the following images:
  • pic32mz_cut.PNG
  • pull_ups.PNG

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 938

7

Wednesday, January 17th 2018, 4:38pm

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 purposes 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: https://www.segger.com/about-us/contact-us/


Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

8

Thursday, February 1st 2018, 2:01pm

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
Giteh has attached the following images:
  • IMG_8284.jpg
  • IMG_8288.jpg
  • IMG_8291.jpg

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 938

9

Thursday, February 1st 2018, 2:43pm

Hello Patryk,

Quoted

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
SEGGER - Nino has attached the following image:
  • Capture.PNG
Please read the forum rules before posting: Forum Rules

Keep in mind, this is not a support forum. Its main purposes 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: https://www.segger.com/about-us/contact-us/


Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

10

Friday, February 9th 2018, 1:35pm

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
Giteh has attached the following images:
  • IMAG0245.jpeg
  • IMAG0246.jpeg
  • jlink.png
  • realice.png
  • jlink_kinetis.png

Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

11

Monday, February 12th 2018, 10:17am

I apologize for poor image quality. I send these again.

Best regards,
Patryk
Giteh has attached the following images:
  • jlink.PNG
  • jlink_kinetis.PNG
  • realice.PNG

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 938

12

Wednesday, February 14th 2018, 4:34pm

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 purposes 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: https://www.segger.com/about-us/contact-us/


Giteh

Beginner

Date of registration: Jan 8th 2018

Posts: 8

13

Thursday, February 15th 2018, 2:12pm

Hello Nino,

When we tested J-Link, switch was in PIM position.

Best regards,
Patryk

SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 938

14

Wednesday, February 21st 2018, 4:29pm

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 purposes 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: https://www.segger.com/about-us/contact-us/


SEGGER - Nino

Super Moderator

Date of registration: Jan 2nd 2017

Posts: 938

15

Monday, March 5th 2018, 9:39am

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 purposes 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: https://www.segger.com/about-us/contact-us/