• AVR Freaks

AnsweredHot!How not to kill a dsPIC33EP?

Page: 12 > Showing page 1 of 2
Author
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
2019/11/15 08:04:56 (permalink)
0

How not to kill a dsPIC33EP?

So I burned through 4 dsPIC33EP256MU806 processors trying to program it with the ICD4.  I checked the board numerous times and from numerous angles.  I reviewed key points in the software & CONFIGs numerous times.  Solder a new dsPIC in place and it programs fine the first time.  After that, hit or miss...for at best a couple times.  Then I remember something about how the ICD4 has a relay click that somehow kills dsPIC33E MCUs.  In the new MPLABX v5.30 Release Notes it says how NOT to program a dsPIC33E, but I can't seem to find HOW to do it.  I have a Snap, PicKit3, and PicKit4.  It's just I use the RJ45 connector on the board, which only the ICD4 can easily connect to.  I have the RJ45-to-6 SIP adaptor.  I was thinking of trying to rig it up backwards to one of the other programmers.  Before I desolder & resolder dsPIC #5 in place, I want to find out what I can do to not kill this next one.  HELP??

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#1
du00000001
Just Some Member
  • Total Posts : 3230
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 08:14:50 (permalink)
0
Clicking ICD ? Not that I had noticed that. But I currently tend to use my RealICE.
 
  • Are you powering the board from the ICD ?
    If not necessary it might be wise to disable the target supply option as well as the high voltage programming option. Low voltage programming should suffice.
I somewhat doubt that the ICD is the culprit. What about the PCB, its power supply etc. ?
 
(I recently developed on a 33E board that was powered from USB (per level shifter/voltage regulator): no issues at all.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#2
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 08:23:19 (permalink)
0
The dsPI33EP is using a 3.3v board mounted regulator for Vdd.  I have tried programming it using ICD4 power and board power.  Several months ago I was doing a research project where I used a dsPIC33EV to data log an event.  After burning up a couple of them (thankfully they were 28-pin DIP and easy to swap out) I switched to the PicKit3 for the remainder of the project and thought nothing more of it.  That's when I found out about ICD4 and dsPIC33 incompatibilities.  I guess my memory isn't what it used to be, as I designed the current board with only the RJ45 connector, no 6-SIP option.
 
Because surely someone will ask:
Windows 10 Pro
MPLABX v5.30
XC16 v1.41

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#3
NorthGuy
Super Member
  • Total Posts : 5805
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: How not to kill a dsPIC33EP? 2019/11/15 08:29:57 (permalink) ☄ Helpfulby mpgmike 2019/11/15 08:40:05
5 (1)
It is not hard to build an RJ-45 to SIP adapter. I think Microchip even sell ones designed to be used in opposite direction (ICD4 -> SIP on board), but I don't see why you couldn't use them your way (PK3 -> RJ-45 on board).
#4
du00000001
Just Some Member
  • Total Posts : 3230
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 08:30:27 (permalink) ☄ Helpfulby mpgmike 2019/11/15 08:40:51
5 (1)
Microchip's RJ-45-to-SIP adapters work both ways. Just in case ...
 
Back to your major issue: disabling the power supply from the ICD4 shouldn't hurt and might improve the situation. Be aware that you have to enter the correct supply voltage anyway, as the level shifters have to be adapted.
 
"Clicking" might be a relay supplying the power (a big difference to the PICKits that can hardly supply 50 mA - most likely via some transistor). And - depending on its design - the onboard regulator might react not too friendly if a secondary supply is connected to its output. (Depends on the exact model and the overall make of the regulator.)

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#5
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 09:03:35 (permalink)
0
I checked board 3.3v supply and it is right about the 3.25v specified in the MPLABX ICD4 Supply Voltage setting; when I check the Use ICD4 Supplied Power option.  I have that adapter, just didn't know if it could be bi-directional.  Sounds like I'll be using the adaptor with one of the PickitX programmers.  I was hoping someone found a work-around for the ICD4-dsPIC33E issue.  Thanks a million guys.

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#6
Jerry Messina
Super Member
  • Total Posts : 445
  • Reward points : 0
  • Joined: 2003/11/07 12:35:12
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 09:34:31 (permalink) ☼ Best Answerby mpgmike 2019/11/15 11:02:38
5 (3)
I was hoping someone found a work-around for the ICD4-dsPIC33E issue

It looks like you should be using external power and not the ICD4 to power the target.
 
From the ICD4 readme... 
ICD4-171 Cannot program a dsPIC33EP256MU806 device when powering the target from the MPLAB ICD 4 debugger.

 
 
#7
du00000001
Just Some Member
  • Total Posts : 3230
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 09:52:47 (permalink)
0
Jerry Messina
From the ICD4 readme... 
ICD4-171 Cannot program a dsPIC33EP256MU806 device when powering the target from the MPLAB ICD 4 debugger.


 
Ouch.
The "dead" microcontrollers might still be good - just not programmable via ICD4 once they've got some software that conflicts with the ICD4 when powering the board. (Root cause of this conflict undisclosed.)

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#8
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 11:02:59 (permalink)
0
The first thing that goes wrong is I get a warning, something along the lines of:
 
"Address 0xXXXXe expected 0xDX, received 0xFX", which I checked and it's a CONFIG address and the incorrect bit is for JTAG.
 
The next thing to go is ID = 0x0000
 
The last thing is it simply cannot do a dang thing (of course that message is in all red letters).
 
I'm going the safe route and switching to the PicKit4.  I ordered more dsPIC33Es, but this is my last one on hand for now.

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#9
du00000001
Just Some Member
  • Total Posts : 3230
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 11:20:12 (permalink)
0
As we've trying to tell you:
  • Disable the power supply from ICD4. (It's just an option to power a target board from the debugger - it's not mandatory.)
  • Once you've done that, you could retry to program the microcontroller already on the board (if it's still there) prior exchanging it.
Once you've disabled the target supply I wouldn't expect further issues at all. Especially as you succeeded in programming the µCs when they were virgin...

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#10
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 11:33:04 (permalink)
0
I already swapped out the MCU on the board.  I'm using the PicKit4 with the RJ45 - 6 SIP adaptor.  So far so good.  The next batch of dsPICs are due Monday or Tuesday.  When I have a fresh batch of replacements, I'll try working with the ICD4 again.  For now I'm a bit gun shy.

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#11
NorthGuy
Super Member
  • Total Posts : 5805
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: How not to kill a dsPIC33EP? 2019/11/15 11:35:51 (permalink)
0
Just out of curiosity, what is your config setting for RSTPRI (AF or PF)?
#12
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 11:45:04 (permalink)
0
RSTPRI = PF.  I'm not using a bootloader, is that the correct choice?

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#13
NorthGuy
Super Member
  • Total Posts : 5805
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: How not to kill a dsPIC33EP? 2019/11/15 12:00:01 (permalink)
5 (1)
mpgmike
RSTPRI = PF.  I'm not using a bootloader, is that the correct choice?



We just had a support case with a customer who had it set to AF. Once AF was programmed, the programming executive wouldn't start. We had to find a workaround. PF should be fine.
 
That's an interesting PIC. Its config bits do not get automatically erased during bulk erase, so the existing config is still in effect during programming. Some of the config bits, such as DEBUG or JTAG (and also recently discovered RSTPRI) can interfere with programmer operation. If any of these bits are present, the programmer must deal with the situation. I do not know how ICD4 handles this.
#14
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 15:24:45 (permalink)
0
Switched over to PicKit4 using the RJ45-to-SIP6 adaptor.  Initially I was programming with the PicKit4 supplying power.  All seemed well.  I decided that instead of plugging/unplugging the programmer, I'd switch over to board supplied power.  Got ID=0xFFF00000; unable to program!  Just burned up my last dsPIC33!  Now on hold till next week when the next batch arrives.  AAARRRGGGHHHHH!!!!

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#15
du00000001
Just Some Member
  • Total Posts : 3230
  • Reward points : 0
  • Joined: 2016/05/03 13:52:42
  • Location: Germany
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 17:42:47 (permalink)
0
@ mpgmike
 
Seems it's time to post your schematics: it's hardly reasonable that you can kill the microcontroller when NOT supplying power from the debugger . . . unless your PCB's power supply has gotten some issues.

PEBKAC / EBKAC / POBCAK / PICNIC (eventually see en.wikipedia.org)
#16
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/15 19:27:40 (permalink)
0
I checked the 3.3v supply with both a volt meter and the scope.  3.24 volts, rock solid DC.  I'm going to sleep on it & see what my subconscious tells me in the morning.

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#17
NorthGuy
Super Member
  • Total Posts : 5805
  • Reward points : 0
  • Joined: 2014/02/23 14:23:23
  • Location: Northern Canada
  • Status: online
Re: How not to kill a dsPIC33EP? 2019/11/15 20:17:58 (permalink) ☄ Helpfulby mpgmike 2019/11/16 03:47:14
0
mpgmike
I'm going to sleep on it & see what my subconscious tells me in the morning.



It'll tell you to check the ground connection between your PIC and PK3.
#18
Ian.M
Super Member
  • Total Posts : 13268
  • Reward points : 0
  • Joined: 2009/07/23 07:02:40
  • Location: UK
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/16 01:16:24 (permalink) ☄ Helpfulby mpgmike 2019/11/16 03:47:10
5 (1)
If either your PC or target board have an un-grounded SMPSU (e.g. a laptop with a two pin mains lead), Y capacitor leakage current from the PSU can instantly destroy the target PIC at the moment of ISCP cable connection if the ISCP signal lines make contact before the Vss (gnd) line.  To mitigate it, fit a grounding strap between target Vss and your PC chassis (or the shell of a USB port if it doesn't have any accessible chassis grounding points).  If both are floating and you have any grounded test equipment on your bench, you'll probably also want toi strap Vss to true ground so the leakage current doesn't destroy your target when you connect test equipment.

--
NEW USERS: Posting images, links and code - workaround for restrictions.
I also support http://picforum.ric323.com because this forum is sometimes too broken to use!
#19
mpgmike
Super Member
  • Total Posts : 330
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: How not to kill a dsPIC33EP? 2019/11/16 03:46:56 (permalink)
0
I have a 4 layer board with a ground plane.  dsPIC and ICSP are grounded to that plane.  I have small capacitor noise filters strewn throughout, especially near the dsPIC Vdd pins.  I have yet to connect the board to the target equipment that it was designed to control.  So far I'm just trying to get the USB function working on the bench.
 
I understand what you're saying about the PC ground, but I've only had issues with dsPICs.  I've used this PC for several years and never had issues with 8-bit PICs or PIC24s, only dsPICs.  Furthermore, I've used the ICD4 on numerous other projects with no issues.  And now I seem to have fried one with a PicKit4.  I have the "MPLAB USB Starter Kit for dsPIC33E DSCs" (DM330012) that uses a dsPIC33EP512MU810 that has never given me a lick of trouble.  It is fully USB powered.  Thank you folks so very much for the ideas.  I'm not sure we've spotted the right demon though.

I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2019 APG vNext Commercial Version 4.5