[SOLVED] Problamatic ICD3 programming

(MPLAB PM3, PICSTART Plus, PICkit 2, PICkit 3) Topics covered in this conference relate to all programmers manufactured and distributed by Microchip.

[SOLVED] Problamatic ICD3 programming

Postby alanmi » Tue Jul 29, 2014 1:26 pm

I am programming a dsPIC33EP512GM304 using a ICD3 and MPLABX 2.10

I have the following problem. When I connect the ICD to the board and power up I can't program unless I plug out (leave the power on) run the selftest using the ICD3 Test module and swap cables.

I am getting the error
"Target Device ID (0x0) does not match expected Device ID (0x1bc00000)"

Any ideas? I do not use the PGED3 and PGEC3 pins for anything else.

Regards
Last edited by alanmi on Wed Jul 30, 2014 12:29 pm, edited 1 time in total.
alanmi
 
Posts: 8
Joined: Tue Jul 29, 2014 1:22 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby Tom Maier » Tue Jul 29, 2014 2:00 pm

"Target Device ID (0x0) ..." means the processor is locked up and ignoring the programming lines. Can you reset the processor to wake it up? That is what you are doing with all the cable swapping.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby alanmi » Tue Jul 29, 2014 3:31 pm

The processor are actually running at the time.
So not sure what you mean by locked up.
As long as I don't take the programming cable out and leave the board powered, I can reprogram as many times as I want, without any 'resetting' necessary.

Regards
alanmi
 
Posts: 8
Joined: Tue Jul 29, 2014 1:22 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby Tom Maier » Tue Jul 29, 2014 3:56 pm

The two main reasons people get target ID = 0 is because:

1.) improper wiring to the target, which isn't true in your case because it programs

2.) the processor is not responding to serial programming... it is ignoring the ID request and MPLAB defaults to an ID of zero when there is no reply. No reply from the target is what I'm referring to as "locked up".

So when it gets stuck, have you tried a processor reset on the mclr line? It's quick and easy to try it.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby alanmi » Tue Jul 29, 2014 4:02 pm

Yep, pulled it low and then release, no difference.

However I just noted something else by playing.
If I unplug the programming cable at board level and then reconnect with board powered up can't program.
If I unplug the programming cable at ICD side and reconnect can program.

Tried this about 5 times with consistent results as explained above.
alanmi
 
Posts: 8
Joined: Tue Jul 29, 2014 1:22 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby Tom Maier » Tue Jul 29, 2014 4:06 pm

Hot plugging/unplugging causes signals on those ICSP lines... It's a high speed link that is very sensitive to noise.

Power cycle the target?
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby alanmi » Tue Jul 29, 2014 4:39 pm

Power cycling the target are what is causing my programming woes.
alanmi
 
Posts: 8
Joined: Tue Jul 29, 2014 1:22 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby Tom Maier » Tue Jul 29, 2014 4:56 pm

I've had similar mysterious ID problems on pic32. It seems to be really picky. Some people have blamed it on having the communication speed for some of these chips at too high a bit rate. I don't know for sure. Acts like an electrical problem with the handshake of the target to the programmer.

One guy on the microchip forum got mad and cut the programming line down to about 6 inches long and he swears it works better, but I am not suggesting that.

Anyway, I've run out of ideas, but it's got something to do with the ICSP lines and the target.

Sorry, best I can do.

If you search for "target id = 0" problems on google you will see what I mean. Don't use your specific chip as part of the search criteria, I've seen this electrical issue personally on pic32 and seen many identical symptom complaints from pic33 people.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby alanmi » Tue Jul 29, 2014 5:21 pm

Thanks Tom for at least trying. I still are going to try and get to the bottom of it, will post if I find anything.
The only difference that I can see between this board and other boards (that works) are that my programming connector are a lot closer to the actual chip and i mean like 10mm wrt about average 30mm on other boards (where I expected problems because of the length).

Regards
Alan
alanmi
 
Posts: 8
Joined: Tue Jul 29, 2014 1:22 pm
PIC experience: Professional 5+ years with MCHP products

Re: Problamatic ICD3 programming

Postby Tom Maier » Tue Jul 29, 2014 5:50 pm

You mentioned something else that might be a clue... When you disconnect the remote end of the programming cable and plug it back in, it works. One difference from plugging the proximal and the distal ends is the capacitance of the cable itself. It seems to want some capacitance on the line when plugged in. I'd guess the cable is 8 pF.

If you do a search for target = 0, you will see a lot of electrical theories and messing around like that. Some people have compared it to trying to balance a strip transmission line at microwave frequencies... very touchy. It's like people are trying to impedance match the cable Z to the board Z.

Well, at least you found something that works. One of those things that drive you mad.
User avatar
Tom Maier
Verified identity
 
Posts: 179
Joined: Mon May 26, 2014 2:37 pm
PIC experience: Professional 5+ years with MCHP products

Next

Return to Programmers

Who is online

Users browsing this forum: No registered users and 5 guests

cron