EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Cortex-Mx MCUs with SWD access locked

Started by pozz June 23, 2022
On 6/24/2022 19:26, David Brown wrote:
> On 24/06/2022 16:42, dalai lamah wrote: >> Un bel giorno pozz digitò: >> >>>> Or maybe some ground loops, for example if you have connected the >>>> J-Link >>>> probe to a desktop PC (or in general a PC not isolated from mains) >>>> and your >>>> boards are somewhat connected to mains or earth ground too. >>> >>> Yes, I use a desktop PC connected to mains and the boards are supplied >>> from an AC/DC connected to mains too. >>> >>> Is this a problematic scenario? >> >> Normally it shouldn't be, but it also depends on what the board does. >> If it >> contains some power stages running at high frequency, it is quite common >> (especially if the EMI filtering is subpar) that switching currents can >> pass through the AC/DC power supply and create problems. >> >> If this keeps happening, try using a laptop isolated from mains and >> see if >> it helps. >> > > Another trick is to make sure you have a separate ground connection > between the board and the PC before attaching the JTAG.  A wire from the > board ground to the PC's case is usually fine. >
That might definitely help. I have seen sparks between a DUT and the scope probe GND more than once. But most importantly one has to learn to quickly identify when a part has been blown. [which is easy to say of course, I remember some 10-12 years ago how I spent at least 3 days to figure out why a 5200B was not completing the boot process, after some disk activity etc.. Turned out I had killed it (tampering with the 1.5V core power regulator, most likely) in a way *one* of its cachelines had one of its longwords damaged.... I did all the investigation - just think tracing through the boot process (no debug port, just the CPU) because I was not very experienced in replacing a BGA.... well, had to acquire the experience it took, it was stressful but I managed :) ].
On 2022-06-24 pozz wrote in comp.arch.embedded:
> Il 24/06/2022 14:15, David Brown ha scritto: > >> Of course you could always have had damage from ground loops, spikes >> when plugging the debugger in and out (if power is on), short-circuits >> when trying to use an oscilloscope probe with clumsy fingers, etc.  If >> you have access to an X-Ray machine, you might be able to get some idea >> about what happened. > > I admit I don't have professional workbench with anti-static writ strap > band and so on, but I worked for many years without these kind of > problems. It's strange I encountered so many problems concentrated in a > few weeks. > > I will understand the problem of ground loops.
Anti-static measures will not help for any of the problems David describes. But they will prevent damage from ESD. Which could also be a source for your problem. Has the weather been very dry in those problem weeks? Or did you change your floor or did you get new shoes? -- Stef Eureka! -- Archimedes
On 24/06/2022 20:29, Stef wrote:
> On 2022-06-24 pozz wrote in comp.arch.embedded: >> Il 24/06/2022 14:15, David Brown ha scritto: >> >>> Of course you could always have had damage from ground loops, spikes >>> when plugging the debugger in and out (if power is on), short-circuits >>> when trying to use an oscilloscope probe with clumsy fingers, etc.  If >>> you have access to an X-Ray machine, you might be able to get some idea >>> about what happened. >> >> I admit I don't have professional workbench with anti-static writ strap >> band and so on, but I worked for many years without these kind of >> problems. It's strange I encountered so many problems concentrated in a >> few weeks. >> >> I will understand the problem of ground loops. > > Anti-static measures will not help for any of the problems David > describes. But they will prevent damage from ESD. Which could also be a > source for your problem. > > Has the weather been very dry in those problem weeks? Or did you change > your floor or did you get new shoes? > >
My experience with ESD damage is that it is often subtle - it leads to long-term reliability issues, rather than outright failures. So the production department at my company is extremely careful about ESD. Up in the development department, we can be a bit laxer as long as the devices are not going to customers (or at least, not going further than the customers' development departments). I can't remember ever having a failure that I could definitely attribute to ESD damage in my lab, while I have definitely solved reliability problems by extra ground connections. Mind you, I would still avoid woollen slippers on a nylon carpet!
On 2022-06-24 David Brown wrote in comp.arch.embedded:
>> > > My experience with ESD damage is that it is often subtle - it leads to > long-term reliability issues, rather than outright failures. So the
True, only large discharges will have an immediate effect. And you will probably have felt the spark.
> production department at my company is extremely careful about ESD. Up
Same here. Conductive floors and no access in certain areas without conductive shoes or conductive straps in normal shoes.
> in the development department, we can be a bit laxer as long as the > devices are not going to customers (or at least, not going further than > the customers' development departments).
Also very recognizable. ;-) We do have ESD matts on most work tables, but wrist straps are seldomly worn. Floors on development are not conductive, but not static as well. Have never felt a discharge on touching stuff there.
> I can't remember ever having a > failure that I could definitely attribute to ESD damage in my lab, while > I have definitely solved reliability problems by extra ground connections.
I think I had such an incident in my home office before I changed the floor. With certain footware on the old floor I'd spark all over the place in dry conditions. Irritating and not good for the equipment.
> Mind you, I would still avoid woollen slippers on a nylon carpet!
Laminate flooring and some plastic shoe soles are also a no-no. -- Stef stop bit received
On 24/06/2022 22:12, Stef wrote:
> On 2022-06-24 David Brown wrote in comp.arch.embedded: >>> >> >> My experience with ESD damage is that it is often subtle - it leads to >> long-term reliability issues, rather than outright failures. So the > > True, only large discharges will have an immediate effect. And you will > probably have felt the spark. > >> production department at my company is extremely careful about ESD. Up > > Same here. Conductive floors and no access in certain areas without > conductive shoes or conductive straps in normal shoes. > >> in the development department, we can be a bit laxer as long as the >> devices are not going to customers (or at least, not going further than >> the customers' development departments). > > Also very recognizable. ;-) > We do have ESD matts on most work tables, but wrist straps are seldomly > worn. Floors on development are not conductive, but not static as well. > Have never felt a discharge on touching stuff there. > >> I can't remember ever having a >> failure that I could definitely attribute to ESD damage in my lab, while >> I have definitely solved reliability problems by extra ground connections. > > I think I had such an incident in my home office before I changed the > floor. With certain footware on the old floor I'd spark all over the > place in dry conditions. Irritating and not good for the equipment. > >> Mind you, I would still avoid woollen slippers on a nylon carpet! > > Laminate flooring and some plastic shoe soles are also a no-no. >
I solve that by never wearing shoes inside. Technically, I fail the conductivity tests everyone has to take before entering the ESD areas, but it's a "too good" failure. That means I am fine to handle boards, but I'm not allowed to play with any high voltage testbenches - the conductive path through me to ground is too good!
On Fri, 24 Jun 2022 16:25:55 +0200, pozz wrote:


>> Of course you could always have had damage from ground loops, spikes >> when plugging the debugger in and out (if power is on), short-circuits >> when trying to use an oscilloscope probe with clumsy fingers, etc.  If >> you have access to an X-Ray machine, you might be able to get some idea >> about what happened. > > I admit I don't have professional workbench with anti-static writ strap > band and so on, but I worked for many years without these kind of > problems. It's strange I encountered so many problems concentrated in a > few weeks. > > I will understand the problem of ground loops.
Take the exact setup and before plugging the debugger measure the voltage between the CPU board ground and the debugger ground with a multi meter in AC mode. My guess is that you have stray AC (mains) voltage on either side (by Y-caps in a PSU or just capacitive coupling over the transformer to the DC side GND). These stray voltages often reach 50% of AC voltage, in you case probably 60V-AC. When you plug the connector they might easily kill a CPU port. -- Reinhardt
Il 24/06/2022 18:26, David Brown ha scritto:
> On 24/06/2022 16:42, dalai lamah wrote: >> Un bel giorno pozz digitò: >> >>>> Or maybe some ground loops, for example if you have connected the >>>> J-Link >>>> probe to a desktop PC (or in general a PC not isolated from mains) >>>> and your >>>> boards are somewhat connected to mains or earth ground too. >>> >>> Yes, I use a desktop PC connected to mains and the boards are supplied >>> from an AC/DC connected to mains too. >>> >>> Is this a problematic scenario? >> >> Normally it shouldn't be, but it also depends on what the board does. >> If it >> contains some power stages running at high frequency, it is quite common >> (especially if the EMI filtering is subpar) that switching currents can >> pass through the AC/DC power supply and create problems. >> >> If this keeps happening, try using a laptop isolated from mains and >> see if >> it helps. >> > > Another trick is to make sure you have a separate ground connection > between the board and the PC before attaching the JTAG.  A wire from the > board ground to the PC's case is usually fine. >
Sorry I don't follow very well these arguments. You say to have a separate ground connection between the board and the PC, but you suggest to connect a wire between them. It seems contradictory to me. What do you mean with board ground? GND, the reference voltage for 3.3V of the MCU? Usually I work on boards with only one low-voltage power supply input (12Vdc, plus and minus) that is down-scaled to 3.3V by a DC/DC switching regulator. There isn't an *earth* connection on the board. Mounting holes are connected to GND, but most of the time, the board is not mounted on my bench.
Il 24/06/2022 20:29, Stef ha scritto:
> On 2022-06-24 pozz wrote in comp.arch.embedded: >> Il 24/06/2022 14:15, David Brown ha scritto: >> >>> Of course you could always have had damage from ground loops, spikes >>> when plugging the debugger in and out (if power is on), short-circuits >>> when trying to use an oscilloscope probe with clumsy fingers, etc.  If >>> you have access to an X-Ray machine, you might be able to get some idea >>> about what happened. >> >> I admit I don't have professional workbench with anti-static writ strap >> band and so on, but I worked for many years without these kind of >> problems. It's strange I encountered so many problems concentrated in a >> few weeks. >> >> I will understand the problem of ground loops. > > Anti-static measures will not help for any of the problems David > describes. But they will prevent damage from ESD. Which could also be a > source for your problem. > > Has the weather been very dry in those problem weeks? Or did you change > your floor or did you get new shoes?
Very dry? On the contrary, now and here we have humid air at least respect other periods of the year. No change in floor or shoes.
On 27/06/2022 08:54, pozz wrote:
> Il 24/06/2022 18:26, David Brown ha scritto: >> On 24/06/2022 16:42, dalai lamah wrote: >>> Un bel giorno pozz digitò: >>> >>>>> Or maybe some ground loops, for example if you have connected the >>>>> J-Link >>>>> probe to a desktop PC (or in general a PC not isolated from mains) >>>>> and your >>>>> boards are somewhat connected to mains or earth ground too. >>>> >>>> Yes, I use a desktop PC connected to mains and the boards are supplied >>>> from an AC/DC connected to mains too. >>>> >>>> Is this a problematic scenario? >>> >>> Normally it shouldn't be, but it also depends on what the board does. >>> If it >>> contains some power stages running at high frequency, it is quite common >>> (especially if the EMI filtering is subpar) that switching currents can >>> pass through the AC/DC power supply and create problems. >>> >>> If this keeps happening, try using a laptop isolated from mains and >>> see if >>> it helps. >>> >> >> Another trick is to make sure you have a separate ground connection >> between the board and the PC before attaching the JTAG.  A wire from >> the board ground to the PC's case is usually fine. >> > > Sorry I don't follow very well these arguments. > > You say to have a separate ground connection between the board and the > PC, but you suggest to connect a wire between them. It seems > contradictory to me.
No, the wire is the connection. The point is to stop any brief surges passing through the debugger and USB system. When boards get connected or unconnected to supplies and other equipment, there can sometimes be slight differences in the ground potential. This can lead to a current pulse, which is sometimes large due to capacitances, and this in turn can lead to voltage pulses. If there is a nice, clean path for the current to follow along a direct connecting wire, that's where the current will go, and the debugger and USB is spared the pulses.
> > What do you mean with board ground? GND, the reference voltage for 3.3V > of the MCU?
Yes, generally.
> Usually I work on boards with only one low-voltage power > supply input (12Vdc, plus and minus) that is down-scaled to 3.3V by a > DC/DC switching regulator. There isn't an *earth* connection on the > board. Mounting holes are connected to GND, but most of the time, the > board is not mounted on my bench. >
These mounting holes are often a good point to connect such a ground wire - just as the mounting screws on the case of the PC are typically a good point on the PC side. Ideally, the power supply enters a board at one point, and you have a star connection from there to any zero volt references (so that noise from ground for high power switching does not disturb the microcontroller, or high frequency noise on the microcontroller ground does not disturb sensitive analogue parts, etc.). And ideally, this ground connection to the PC also comes from that star. In practice, for simpler boards a single ground reference plane is usually all you need, and all you need here is for your ground connection wire to have a good low impedance connection. A croc clip wire clipped to the mounting holes or screws is fine. (I am referring to local ground, or zero volt reference - not "true ground" or "earth". You only need an earth connection if you have high voltages and safety concerns.)
On 27/06/2022 09:06, pozz wrote:
> Il 24/06/2022 20:29, Stef ha scritto: >> On 2022-06-24 pozz wrote in comp.arch.embedded: >>> Il 24/06/2022 14:15, David Brown ha scritto: >>> >>>> Of course you could always have had damage from ground loops, spikes >>>> when plugging the debugger in and out (if power is on), short-circuits >>>> when trying to use an oscilloscope probe with clumsy fingers, etc.  If >>>> you have access to an X-Ray machine, you might be able to get some idea >>>> about what happened. >>> >>> I admit I don't have professional workbench with anti-static writ strap >>> band and so on, but I worked for many years without these kind of >>> problems. It's strange I encountered so many problems concentrated in a >>> few weeks. >>> >>> I will understand the problem of ground loops. >> >> Anti-static measures will not help for any of the problems David >> describes. But they will prevent damage from ESD. Which could also be a >> source for your problem. >> >> Has the weather been very dry in those problem weeks? Or did you change >> your floor or did you get new shoes? > > Very dry? On the contrary, now and here we have humid air at least > respect other periods of the year. >
Humid is good. In electronics production facilities, air humidifiers are common as humid air lets any static buildups drain away safely. (Of course, there is always a limit - you don't want condensation on your boards!)
> No change in floor or shoes. >

The 2024 Embedded Online Conference