AnsweredHot!ICD3 debugging

Page: 12 > Showing page 1 of 2
Author
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
2018/03/07 08:09:28 (permalink)
0

ICD3 debugging

I have an ICD3 for some time but never used it. I am now trying it again on a PIC16F1828 however I am getting errors when trying to debug the program. Using MPLAB X IDE
 
Connecting to MPLAB ICD 3...
Currently loaded firmware on ICD 3
Firmware Suite Version.....01.51.08 *
Firmware type..............Unknown Firmware Type
Now Downloading new Firmware for target device: PIC16F1828
Downloading RS...
RS download complete
Programming download...
Transmission on endpoint 2 failed
Connection Failed.
If the problem persists, please disconnect and reconnect the ICD 3 to the USB cable. If this does not fix the problem verify that the proper MPLAB X USB drivers have been installed.
 
Using MPlab IPE I can program the device without problems using same ICD3. 
#1
KTrenholm
Super Member
  • Total Posts : 450
  • Reward points : 0
  • Joined: 2012/08/08 14:04:23
  • Location: Connecticut, USA
  • Status: offline
Re: ICD3 debugging 2018/03/07 08:53:42 (permalink)
0
Moonwalker
Using MPlab IPE I can program the device without problems using same ICD3.



Have you tried what the error message suggests?
If the problem persists, please disconnect and reconnect the ICD 3 to the USB cable. If this does not fix the problem verify that the proper MPLAB X USB drivers have been installed.
Are you doing the driver switch from MPLAB 8.x to MPLAB X before attempting to use the ICD3 in X?  Legacy MPLAB and X use different drivers.  Use the MPLAB Driver Switcher program that was installed with MPLAB X to swap between them if you are switching IDEs.
 
EDIT:
Nevermind, I read "IPE" as "IDE" and thought you were switching from legacy MPLAB to X without switching the driver.
First things to try are usually a disconnect and reconnect of the USB cable to the ICD3 and a reboot of the PC.  That cleans up 95% of Endpoint errors that I come across.
post edited by KTrenholm - 2018/03/07 09:04:02
#2
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 09:03:49 (permalink)
0
Connecting to MPLAB ICD 3...
Currently loaded firmware on ICD 3
Firmware Suite Version.....01.51.08
Firmware type..............Enhanced Midrange
Target voltage detected
Target Device ID (0x27c0) is an Invalid Device ID. Please check your connections to the Target Device.
Device Erased...
Programming...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x7ff
configuration memory
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.
#3
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 09:07:04 (permalink)
0
#pragma config FOSC = INTOSC // Oscillator Selection->INTOSC oscillator: I/O function on CLKIN pin
#pragma config WDTE = OFF // Watchdog Timer Enable->WDT disabled
#pragma config PWRTE = OFF // Power-up Timer Enable->PWRT disabled
#pragma config MCLRE = OFF // MCLR Pin Function Select->MCLR/VPP pin function is digital input
#pragma config CP = OFF // Flash Program Memory Code Protection->Program memory code protection is disabled
#pragma config CPD = OFF // Data Memory Code Protection->Data memory code protection is disabled
#pragma config BOREN = ON // Brown-out Reset Enable->Brown-out Reset enabled
#pragma config CLKOUTEN = OFF // Clock Out Enable->CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin
#pragma config IESO = ON // Internal/External Switchover->Internal/External Switchover mode is enabled
#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable->Fail-Safe Clock Monitor is enabled
// CONFIG2
#pragma config WRT = OFF // Flash Memory Self-Write Protection->Write protection off
#pragma config PLLEN = OFF // PLL Enable->4x PLL disabled
#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable->Stack Overflow or Underflow will cause a Reset
#pragma config BORV = LO // Brown-out Reset Voltage Selection->Brown-out Reset Voltage (Vbor), low trip point selected.
#pragma config LVP = OFF // Low-Voltage Programming Enable->High-voltage on MCLR/VPP must be used for programming
 
#4
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 09:08:28 (permalink)
0
I am now getting error above. How is (0x27c0) is an Invalid Device ID??
 
#5
KTrenholm
Super Member
  • Total Posts : 450
  • Reward points : 0
  • Joined: 2012/08/08 14:04:23
  • Location: Connecticut, USA
  • Status: offline
Re: ICD3 debugging 2018/03/07 09:15:56 (permalink)
0
Moonwalker
I am now getting error above. How is (0x27c0) is an Invalid Device ID??


That ID looks right for Rev.0 of that PIC.  What version of MPLAB X are you using?
#6
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 09:20:12 (permalink)
0
Was using 3.65 but now installed 4.15  and still not working.
post edited by Moonwalker - 2018/03/07 09:22:50

Attached Image(s)

#7
Jim Nickerson
User 452 _
  • Total Posts : 5126
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: ICD3 debugging 2018/03/07 09:59:02 (permalink)
0
Interesting device Id/Revision

Attached Image(s)

#8
KTrenholm
Super Member
  • Total Posts : 450
  • Reward points : 0
  • Joined: 2012/08/08 14:04:23
  • Location: Connecticut, USA
  • Status: offline
Re: ICD3 debugging 2018/03/07 10:04:01 (permalink)
0
JANickerson
Interesting device Id/Revision




Huh.  So he should be seeing 0x27C1/3/4/5 presumably rather than 0x27C0?
#9
Jim Nickerson
User 452 _
  • Total Posts : 5126
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: ICD3 debugging 2018/03/07 10:20:56 (permalink)
0
maybe there is a problem with the connections.
#10
du00000001
Just Some Member
  • Total Posts : 2075
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: ICD3 debugging 2018/03/07 12:00:02 (permalink)
0
Some severe loading of either PGC or PGD might result in such effects. Short from not working at all.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#11
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 15:55:49 (permalink)
0
Ok there may be some loading on the pins but how come programming works perfectly? 
Will have a try with open pins anyway.
#12
du00000001
Just Some Member
  • Total Posts : 2075
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: ICD3 debugging 2018/03/07 16:39:51 (permalink)
0
Difficult to assess from the distance (I'd suggest to make scope measurements on a good and the not-so-good board and compare waveforms). Could well depend on current board activity plus might depend on data direction plus the data themselves, (27C is passing through - just the 1 after some lengthy seies of 0s seems to get lost.)
Could be some timing that only rarely exceeds the spec. And might be better for downstream than for upstream.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#13
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 17:26:47 (permalink)
0
According to this - https://www.uploadarchief.net/files/download/devlist.pdf
PIC16F1827 a0 0x27A0
PIC16F1828 0x27c0
PIC16F1828 a0 0x27C0
PIC16F1829 0x27e0
PIC16F1829 a0 0x27E0
 
so the 27C0 seems the correct Device ID.  So why is MPLab/ICD3 not recognizing it??
 
I have attached a scope screen of the Program lines. They seem quite clear for me.

Attached Image(s)

#14
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 17:32:11 (permalink)
0
I have disconnected the lines but still getting same result.
 
I am thinking that the ICD3 is defective as sometime ago when I tried to use it I was getting similar problems. But how can I be sure of this? Running the selftest just shows green LED and nothing on the screen.
#15
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 17:45:31 (permalink)
0
Does ICD debugger work properly with device using internal clock?
#16
du00000001
Just Some Member
  • Total Posts : 2075
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: ICD3 debugging 2018/03/07 18:20:38 (permalink)
0
Provided the upper trace id PGC, the falling edge might have to meet the pulses on PGD (just assuming). Although difficult to assess in this image, I'd say it's not bad.
Funny that the M'chip documentation does not mention an A0 revision.
And the problem could well be some issue on the PC's side. Some newer driver install(s) resulting in resource collisions, high overall system load, ... Does the ICD work flawless with some other board(s)?

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#17
NKurzman
A Guy on the Net
  • Total Posts : 16281
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/07 18:26:20 (permalink)
0
du00000001
Funny that the M'chip documentation does not mention an A0 revision.
 



Is it a pre-release Engineering sample?
#18
Moonwalker
Starting Member
  • Total Posts : 34
  • Reward points : 0
  • Joined: 2010/05/07 02:21:15
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/08 02:39:22 (permalink)
0
I bought them from Farnell so they should not be samples.
 
Now tested the ICD3 on another project using Pic16F1825 and got similar error
 
Connecting to MPLAB ICD 3...
Currently loaded firmware on ICD 3
Firmware Suite Version.....01.51.08
Firmware type..............Enhanced Midrange
Target voltage detected
Target Device ID (0x2760) is an Invalid Device ID. Please check your connections to the Target Device.
Device Erased...
Programming...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x1fff
configuration memory
EEData memory
program memory
Address: 1 Expected Value: 3180 Received Value: 3100
Failed to program device
 
 I have ordered a Pickit4 now as I think this ICD3 is not working properly.
#19
NKurzman
A Guy on the Net
  • Total Posts : 16281
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: ICD3 debugging 2018/03/08 06:34:08 (permalink)
+1 (1)
Take the self test board that came with the icd3 and run the self test.
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2018 APG vNext Commercial Version 4.5