ICD4 not Halting

Discussion on MPLAB's In Circuit Debuggers for select Microchip FLASH devices.

ICD4 not Halting

Postby northeastman » Fri Oct 15, 2021 3:50 pm

Hi,
I am new to this forum but have been on the MC forum for quite a long time.

Posted this on the MC forum today 15/10/2021 - (UK date format by the way dd/mm/yyyy)

Thought I would also post it on here in case someone on this forum can assist.

Running these.

Product Version: MPLAB X IDE v5.50
Java: 1.8.0_222; OpenJDK 64-Bit Server VM 25.222-b10
Runtime: OpenJDK Runtime Environment 1.8.0_222-b10
System: Windows 10 version 10.0 running on amd64; Cp1252; en (mplab)

PIC18F47K40 on one of our product boards currently under software development.

When trying to debug using ICD4 we keep running into this problem.
Attempting to Halt or Pause the session gives us:

Halting...

This goes on for for approximately 1 minute.
Followed by
An internal run error has occurred. It is advised that you restart your debug session. You may continue running but certain run time features may no longer work properly.
Target Halted.

If we disconnect the ICD4 at Halting... from the PC USB port we then get:-

Transmission on endpoint 2 failed (err = -109)
Transmission on endpoint 2 failed (err = -109)
Transmission on endpoint 2 failed (err = -109)
A communication error with the debug tool has occurred. The tool will attempt to recover momentarily.


This is probably to be expected but it would be nice to know where we could get a list of these "err" codes as they seem to pop up at various times and may be a clue to the reason for each failure. Obviously in this case -109 is a connection failure caused by us disconnecting the USB port from ICD4.

After re-connecting the ICD4 to the USB port; We can then restart the debug session and reloading our program.

This appears to happen most often if we try and set a breakpoint while the program is executing if that has any bearing on the issue. If we try and Pause before setting breakpoint the error occurs - sometimes?

We thought this may be an earthing issue with the USB port which is on a laptop so we connected 0V of our project to mains Gnd. This did not cure the issue.

Also investigated memory overflows and found no issues in the project software.

I have also tried a Hardware reset/reboot on the ICD4. That seemed to make the issue go away for a while but then it returns. ICD4 Test jig always shows OK.

This issue is annoying, and very time consuming, as when you are about to discover the reason the our software is not behaving, the debugger packs in and you loose the thread of where you where up to while it gets reloaded.

Could this be a Windows 10 driver issue, if so how to trace and rectify?

Any helpful suggestions would be gratefully received.

Thanks for reading
northeastman
 
Posts: 2
Joined: Fri Oct 15, 2021 3:20 pm
PIC experience: Professional 5+ years with MCHP products

Re: ICD4 not Halting

Postby ric » Tue Oct 19, 2021 5:20 am

northeastman wrote:Hi,
Posted this on the MC forum today 15/10/2021 - (UK date format by the way dd/mm/yyyy)

I always post dates as dd-mmm-yyyy to avoid confusion. e.g. 15-Oct-2021

Thought I would also post it on here in case someone on this forum can assist.

Unfortunately you'll find it's much the same people. I don't have an ICD4, so have not observed this.

Have you tried lodging a support ticket? That's th eonly official way to get Microchip staff involved.
http://support.microchip.com
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products

Re: ICD4 not Halting

Postby northeastman » Sun Oct 24, 2021 1:20 pm

Hi all,
Just an update.
Got tired of trying to debug with ICD4 so we reverted this project back to ICD3.
No issues at all with ICD3, so ICD4 definitely appears to have some form of communications issue! (Bug or Design feature with Windows 10).

With ICD3, if we enthusiastically try and set a breakpoint while the project is running, we get a polite message telling us that with ICD3 and this processor PIC18F47K40 we are not allowed to set breakpoints while running.
Fair enough, so we can pause or halt without any problem, set our breakpoint and away we go again.
ICD4 does not respond that way.

Hope this helps someone else.
We will report this to MS support, only if someone else has this issue?
Otherwise MS will probably say it is a peculiarity of our PC/Software/Project or something.

Thanks for reading.
Northeastman
northeastman
 
Posts: 2
Joined: Fri Oct 15, 2021 3:20 pm
PIC experience: Professional 5+ years with MCHP products


Return to MPLAB ICD In Circuit Debuggers

Who is online

Users browsing this forum: No registered users and 1 guest

cron