Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"The most important thing in a man is not what he knows, but what he is." -- Narciso Yepes


devel / comp.arch.embedded / Cortex-Mx MCUs with SWD access locked

SubjectAuthor
* Cortex-Mx MCUs with SWD access lockedpozz
`* Re: Cortex-Mx MCUs with SWD access lockedpozz
 +* Re: Cortex-Mx MCUs with SWD access lockeddalai lamah
 |`* Re: Cortex-Mx MCUs with SWD access lockedpozz
 | `* Re: Cortex-Mx MCUs with SWD access lockeddalai lamah
 |  +* Re: Cortex-Mx MCUs with SWD access lockedpozz
 |  |`- Re: Cortex-Mx MCUs with SWD access lockeddalai lamah
 |  `* Re: Cortex-Mx MCUs with SWD access lockedDavid Brown
 |   +- Re: Cortex-Mx MCUs with SWD access lockedDimiter_Popoff
 |   `* Re: Cortex-Mx MCUs with SWD access lockedpozz
 |    `- Re: Cortex-Mx MCUs with SWD access lockedDavid Brown
 `* Re: Cortex-Mx MCUs with SWD access lockedDavid Brown
  `* Re: Cortex-Mx MCUs with SWD access lockedpozz
   +* Re: Cortex-Mx MCUs with SWD access lockedStef
   |+* Re: Cortex-Mx MCUs with SWD access lockedDavid Brown
   ||`* Re: Cortex-Mx MCUs with SWD access lockedStef
   || `- Re: Cortex-Mx MCUs with SWD access lockedDavid Brown
   |`* Re: Cortex-Mx MCUs with SWD access lockedpozz
   | `- Re: Cortex-Mx MCUs with SWD access lockedDavid Brown
   `* Re: Cortex-Mx MCUs with SWD access lockedReinhardt Behm
    `* Re: Cortex-Mx MCUs with SWD access lockedpozz
     `* Re: Cortex-Mx MCUs with SWD access lockedReinhardt Behm
      `* Re: Cortex-Mx MCUs with SWD access lockedpozz
       `* Re: Cortex-Mx MCUs with SWD access lockedStef
        `* Re: Cortex-Mx MCUs with SWD access lockedpozz
         `- Re: Cortex-Mx MCUs with SWD access lockedStef

Pages:12
Cortex-Mx MCUs with SWD access locked

<t92mgi$d1l$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=908&group=comp.arch.embedded#908

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Cortex-Mx MCUs with SWD access locked
Date: Thu, 23 Jun 2022 23:38:25 +0200
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <t92mgi$d1l$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 23 Jun 2022 21:38:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="3b811855cf2e10eee5cfad9db33d7d00";
logging-data="13365"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18S8gMPrhi2mQf2/axxGV0setz0fs2zoic="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:tGNOVKb78xyQ0+AHDAwMP6KvSxY=
 by: pozz - Thu, 23 Jun 2022 21:38 UTC

I know it's a very specific question, so I don't have many hopes to find
a solution here, but I already tried everything and I don't know how to
solve the issue I have that is very annoying.

I have three PCBs: PCB1 that mounts LPC54101 (M4), PCB2 that mounts
LPC54606 (M4), PCB3 that mounts LPC54618 (M4). All these MCUs are from NXP.

After I receive the first prototype for each board, I was able to make a
connection through SWD, by using a J-Link probe. I use MCUXpresso as the
IDE for debug launch.

Well, after some tests (write some code, download new images, debug some
and so on), I received an error from the probe: no SWD target found
(Could not connect to the target).

The MCU appears working well with the last downloaded image, but the SWD
access seems disabled. Moreover the MCU is able to enter UART ISP Boot
(by pulling down a specific ISP pin) and I can erase and rewrite the
internal Flash by UART.
I tried to connect by SWD even when the MCU has booted in ISP Boot ROM,
without any success.

Ok, something went wrong with this MCU, it could happen on prototypes
during development.
But the big issue I am worried about and that is incredible for me, is
that this exactly sequence of events happened for one prototype of PCB1,
one of PCB2 and one of PCB3!!!

After some program&debug cycle (for a few days all is ok), the probe
isn't able to connect to the target anymore.

The probe and cables seem ok, because if I replace bricked PCBs with a
working PCB, all is ok.

I tried to contact NXP support, but they couldn't solve this problem and
don't know what happened to bricked MCUs.

LPC546xx MCUs have a complex mechanism (some values at specific address
in the Flash and OTP memory) that allows to restrict access via ISP
and/or SWD, but LPC5410x is much more simple. The protection is enabled
by writing some magic words at specific address in the internal Flash.
However I'm able to erase the internal Flash (by UART ISP) so this can't
be the reason of SWD issue.
For what I have read, there's now way to lock SWD access after an erase
of internal Flash memory.

I used J-Link with LPC17xx for many years in the past without any issue.
What's the problem with LPC54?

Do you have some suggestions?

Re: Cortex-Mx MCUs with SWD access locked

<t93vu7$ukp$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=911&group=comp.arch.embedded#911

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 11:25:28 +0200
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <t93vu7$ukp$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 24 Jun 2022 09:25:27 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="506d9e038cdcbb2d63d5329d7863bcdb";
logging-data="31385"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/b2HOoTS755e+QTLJmSB8jSfsiR75F7MU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:VVD+kWNEjRYwCx7eCOICuIT0v2A=
In-Reply-To: <t92mgi$d1l$1@dont-email.me>
 by: pozz - Fri, 24 Jun 2022 09:25 UTC

Il 23/06/2022 23:38, pozz ha scritto:
> Do you have some suggestions?

Today I found that SWDIO signal isn't able to swing normally between GND
and VDD on broken MCUs. I suspect something bad occurred inside the MCU,
but it's strange it happened on three different boards with three
different MCUs.

Could it be ESD?

Re: Cortex-Mx MCUs with SWD access locked

<sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=912&group=comp.arch.embedded#912

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!aioe.org!+uFI85LoQqCpsO7NQdOz6w.user.46.165.242.75.POSTED!not-for-mail
From: antonio1...@hotmail.com (dalai lamah)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 12:22:06 +0200
Organization: Aioe.org NNTP Server
Message-ID: <sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="2743"; posting-host="+uFI85LoQqCpsO7NQdOz6w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: 40tude_Dialog/2.0.15.1it
X-Face: #^0cuOKw--#Q:"y/,&C;}2$_tSLc]PEJ^{cm%=omYXmfR"cSLu`<R:LRUq0q8W)T~e20'Ri gN/ct+i_K+F~-u0lXixh"|ga@w^:D?@OdallB_O(Bg<4m39>9oxl2!tVF1/w
X-Notice: Filtered by postfilter v. 0.9.2
 by: dalai lamah - Fri, 24 Jun 2022 10:22 UTC

Un bel giorno pozz digitò:

>> Do you have some suggestions?
>
> Today I found that SWDIO signal isn't able to swing normally between GND
> and VDD on broken MCUs. I suspect something bad occurred inside the MCU,
> but it's strange it happened on three different boards with three
> different MCUs.
>
> Could it be ESD?

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.

Note that laptops with the charger plugged in are not perflectly isolated
from mains either. I've experienced noise problems in several occasions
with JTAG probes connected to laptops with the charger plugged in. The
noise disappeared just by unplugging the charger.

--
Fletto i muscoli e sono nel vuoto.

Re: Cortex-Mx MCUs with SWD access locked

<t949sk$4jp$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=913&group=comp.arch.embedded#913

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 14:15:15 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <t949sk$4jp$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 24 Jun 2022 12:15:16 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="063962f46afe02c8cc12582c35e3f65e";
logging-data="4729"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wE0LXIhL2IEpd1yCy/pTOINQIKP/YRcc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:nph2AfDOv2U43jAtCsTlQHIF134=
In-Reply-To: <t93vu7$ukp$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Fri, 24 Jun 2022 12:15 UTC

On 24/06/2022 11:25, pozz wrote:
> Il 23/06/2022 23:38, pozz ha scritto:
>> Do you have some suggestions?
>
> Today I found that SWDIO signal isn't able to swing normally between GND
> and VDD on broken MCUs. I suspect something bad occurred inside the MCU,
> but it's strange it happened on three different boards with three
> different MCUs.
>
> Could it be ESD?

I don't know these particular microcontrollers in detail, but there are
two things that can cause problems with debugging that I can think of.

One is that you can often re-use the pin as a GPIO. If your program
re-uses the debug pins as GPIO, then maybe this is happening before the
debugger can get access. The debugger should be able to fix this if it
has access to a hard reset pin, but some setups are missing that.

The other is that sometimes you can disable the debugger for security
reasons. I've done that by accident on a microcontroller (an AVR, IIRC).

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.

Re: Cortex-Mx MCUs with SWD access locked

<t94hhi$u4k$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=914&group=comp.arch.embedded#914

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 16:25:55 +0200
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <t94hhi$u4k$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Jun 2022 14:25:55 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="506d9e038cdcbb2d63d5329d7863bcdb";
logging-data="30868"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9NkrNKJBbtFR16sEv2gp0N6Z+HAx4mUE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:ebJ7Ar7bPCYJEe2bijIi3v5oqXA=
In-Reply-To: <t949sk$4jp$1@dont-email.me>
 by: pozz - Fri, 24 Jun 2022 14:25 UTC

Il 24/06/2022 14:15, David Brown ha scritto:
> On 24/06/2022 11:25, pozz wrote:
>> Il 23/06/2022 23:38, pozz ha scritto:
>>> Do you have some suggestions?
>>
>> Today I found that SWDIO signal isn't able to swing normally between
>> GND and VDD on broken MCUs. I suspect something bad occurred inside
>> the MCU, but it's strange it happened on three different boards with
>> three different MCUs.
>>
>> Could it be ESD?
>
> I don't know these particular microcontrollers in detail, but there are
> two things that can cause problems with debugging that I can think of.
>
> One is that you can often re-use the pin as a GPIO.  If your program
> re-uses the debug pins as GPIO, then maybe this is happening before the
> debugger can get access.  The debugger should be able to fix this if it
> has access to a hard reset pin, but some setups are missing that.

Yes I know that, but these microcontrollers can be booted into ISP UART
mode by pulling down a pin at power up. When the MCU is in ISP mode,
your application doesn't started so the pins stay configured as per
their default, so SWD pins are SWD configured.

In my case, these MCUs enter ISP mode normally (I can send ISP commands
and receive replies), but even in this state the debugger can't connect
via SWD.

> The other is that sometimes you can disable the debugger for security
> reasons.  I've done that by accident on a microcontroller (an AVR, IIRC).

Yes I know that too. LPC546XX MCUs are complex on this topic, but
LPC541XX MCUs are very simple. You can restrict SWD access by writing
magic values on certain positions.
However I can erase the entire Flash through ISP commands, so after
erasing all restrictions should be disabled.

> 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.

Re: Cortex-Mx MCUs with SWD access locked

<t94hld$u4k$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=915&group=comp.arch.embedded#915

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 16:27:57 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <t94hld$u4k$2@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Jun 2022 14:27:57 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="506d9e038cdcbb2d63d5329d7863bcdb";
logging-data="30868"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vqm8sbUJEw5ErAnipePrJqfg+D/yrc9I="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:MQeGXgoDMS7PoYClRmBCggfKPhQ=
In-Reply-To: <sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net>
 by: pozz - Fri, 24 Jun 2022 14:27 UTC

Il 24/06/2022 12:22, dalai lamah ha scritto:
> Un bel giorno pozz digitò:
>
>>> Do you have some suggestions?
>>
>> Today I found that SWDIO signal isn't able to swing normally between GND
>> and VDD on broken MCUs. I suspect something bad occurred inside the MCU,
>> but it's strange it happened on three different boards with three
>> different MCUs.
>>
>> Could it be ESD?
>
> 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?

> Note that laptops with the charger plugged in are not perflectly isolated
> from mains either. I've experienced noise problems in several occasions
> with JTAG probes connected to laptops with the charger plugged in. The
> noise disappeared just by unplugging the charger.
>

Re: Cortex-Mx MCUs with SWD access locked

<1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=916&group=comp.arch.embedded#916

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!aioe.org!+uFI85LoQqCpsO7NQdOz6w.user.46.165.242.75.POSTED!not-for-mail
From: antonio1...@hotmail.com (dalai lamah)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 16:42:26 +0200
Organization: Aioe.org NNTP Server
Message-ID: <1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me> <sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net> <t94hld$u4k$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="32032"; posting-host="+uFI85LoQqCpsO7NQdOz6w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: 40tude_Dialog/2.0.15.1it
X-Face: #^0cuOKw--#Q:"y/,&C;}2$_tSLc]PEJ^{cm%=omYXmfR"cSLu`<R:LRUq0q8W)T~e20'Ri gN/ct+i_K+F~-u0lXixh"|ga@w^:D?@OdallB_O(Bg<4m39>9oxl2!tVF1/w
X-Notice: Filtered by postfilter v. 0.9.2
 by: dalai lamah - Fri, 24 Jun 2022 14:42 UTC

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.

--
Fletto i muscoli e sono nel vuoto.

Re: Cortex-Mx MCUs with SWD access locked

<t94jbb$c8d$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=917&group=comp.arch.embedded#917

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 16:56:44 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <t94jbb$c8d$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net> <t94hld$u4k$2@dont-email.me>
<1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Jun 2022 14:56:43 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="506d9e038cdcbb2d63d5329d7863bcdb";
logging-data="12557"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/o1LaJ4mhxUQys1XY1llLmNO8+3QxbACE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:V8lTPwkQb7Muo+H6XH2iXlzLceY=
In-Reply-To: <1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net>
 by: pozz - Fri, 24 Jun 2022 14:56 UTC

Il 24/06/2022 16:42, dalai lamah ha scritto:
> 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.

The target board power input is 12Vdc and on-board DC/DC (TPS54231,
570kHz) generates a single 3.3V.

> If this keeps happening, try using a laptop isolated from mains and see if
> it helps.

I hate laptop as development machine, I will try some USB and/or
debugger isolator. However I imaging the problem would arise with
oscilloscope, UART/USB converter and so on.

Re: Cortex-Mx MCUs with SWD access locked

<18174al0md53b.i9pnivzeylmv$.dlg@40tude.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=918&group=comp.arch.embedded#918

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!aioe.org!+uFI85LoQqCpsO7NQdOz6w.user.46.165.242.75.POSTED!not-for-mail
From: antonio1...@hotmail.com (dalai lamah)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 17:16:55 +0200
Organization: Aioe.org NNTP Server
Message-ID: <18174al0md53b.i9pnivzeylmv$.dlg@40tude.net>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me> <sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net> <t94hld$u4k$2@dont-email.me> <1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net> <t94jbb$c8d$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="64709"; posting-host="+uFI85LoQqCpsO7NQdOz6w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: 40tude_Dialog/2.0.15.1it
X-Notice: Filtered by postfilter v. 0.9.2
X-Face: #^0cuOKw--#Q:"y/,&C;}2$_tSLc]PEJ^{cm%=omYXmfR"cSLu`<R:LRUq0q8W)T~e20'Ri gN/ct+i_K+F~-u0lXixh"|ga@w^:D?@OdallB_O(Bg<4m39>9oxl2!tVF1/w
 by: dalai lamah - Fri, 24 Jun 2022 15:16 UTC

Un bel giorno pozz digitò:

>> If this keeps happening, try using a laptop isolated from mains and see if
>> it helps.
>
> I hate laptop as development machine, I will try some USB and/or
> debugger isolator. However I imaging the problem would arise with
> oscilloscope, UART/USB converter and so on.

Maybe, but the peculiarity of the JTAG probe is that it is usually
connected directly to the CPU. Therefore the loop currents may close
directly through the CPU pins, which are quite susceptible to this kind of
things.

This is the reason why sometimes it can be useful to place a buffer (i.e.
74lcx244 or similar) between the probe and the CPU. This may not solve the
problem, but even in the case of a failure you will have to replace just an
inexpensive buffer instead of the entire CPU.

--
Fletto i muscoli e sono nel vuoto.

Re: Cortex-Mx MCUs with SWD access locked

<t94ojc$mvo$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=919&group=comp.arch.embedded#919

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 18:26:20 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <t94ojc$mvo$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net> <t94hld$u4k$2@dont-email.me>
<1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Jun 2022 16:26:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8502541acb6b48729f299258efb62d62";
logging-data="23544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18O2lLL40am0ecAfkSBUqlxZZX8yNdaONs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:Kccmph949IXCmpJ4td4rCEBf+xc=
In-Reply-To: <1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net>
Content-Language: en-GB
 by: David Brown - Fri, 24 Jun 2022 16:26 UTC

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.

Re: Cortex-Mx MCUs with SWD access locked

<t94qkb$711$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=920&group=comp.arch.embedded#920

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dp...@tgi-sci.com (Dimiter_Popoff)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 20:00:58 +0300
Organization: TGI
Lines: 44
Message-ID: <t94qkb$711$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net> <t94hld$u4k$2@dont-email.me>
<1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net> <t94ojc$mvo$1@dont-email.me>
Reply-To: dp@tgi-sci.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Jun 2022 17:00:59 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a0af44538c4c75eb6249cc8a796865af";
logging-data="7201"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HGTl258WQm0U3phkD85kJUSjTuav52KU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:8z1aA0aybTtsDQtuyfAlUB5H3Bc=
In-Reply-To: <t94ojc$mvo$1@dont-email.me>
Content-Language: en-US
 by: Dimiter_Popoff - Fri, 24 Jun 2022 17:00 UTC

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 :) ].

Re: Cortex-Mx MCUs with SWD access locked

<nnd$6eee50df$7dbf7e68@8d4ce289928ac989>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=921&group=comp.arch.embedded#921

  copy link   Newsgroups: comp.arch.embedded
Newsgroups: comp.arch.embedded
From: me...@this.is.invalid (Stef)
Subject: Re: Cortex-Mx MCUs with SWD access locked
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
Mail-Copies-To: nobody
User-Agent: slrn/1.0.3 (Linux)
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-ID: <nnd$6eee50df$7dbf7e68@8d4ce289928ac989>
Organization: Newsxs
Date: Fri, 24 Jun 2022 20:29:39 +0200
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!ecngs!feeder2.ecngs.de!178.20.174.213.MISMATCH!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp003.abavia.com!news.newsxs.nl!not-for-mail
Lines: 30
Injection-Date: Fri, 24 Jun 2022 20:29:39 +0200
Injection-Info: news.newsxs.nl; mail-complaints-to="abuse@newsxs.nl"
X-Received-Bytes: 1869
 by: Stef - Fri, 24 Jun 2022 18:29 UTC

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

Re: Cortex-Mx MCUs with SWD access locked

<t95030$f52$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=922&group=comp.arch.embedded#922

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Fri, 24 Jun 2022 20:34:08 +0200
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <t95030$f52$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<nnd$6eee50df$7dbf7e68@8d4ce289928ac989>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 24 Jun 2022 18:34:08 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="8502541acb6b48729f299258efb62d62";
logging-data="15522"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+eYYKuDw5uMLYVxq5tRfQrtE9hFOORh34="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:6kGoigrhUoHgFgj7icOe2g2/LUQ=
In-Reply-To: <nnd$6eee50df$7dbf7e68@8d4ce289928ac989>
Content-Language: en-GB
 by: David Brown - Fri, 24 Jun 2022 18:34 UTC

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!

Re: Cortex-Mx MCUs with SWD access locked

<nnd$7b7ec9f5$756665f6@fbe2966cbf96e485>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=923&group=comp.arch.embedded#923

  copy link   Newsgroups: comp.arch.embedded
Newsgroups: comp.arch.embedded
From: me...@this.is.invalid (Stef)
Subject: Re: Cortex-Mx MCUs with SWD access locked
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me> <t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me> <nnd$6eee50df$7dbf7e68@8d4ce289928ac989> <t95030$f52$1@dont-email.me>
Mail-Copies-To: nobody
User-Agent: slrn/1.0.3 (Linux)
Message-ID: <nnd$7b7ec9f5$756665f6@fbe2966cbf96e485>
Organization: Newsxs
Date: Fri, 24 Jun 2022 22:12:11 +0200
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!feeder1.feed.usenet.farm!feed.usenet.farm!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp001.abavia.com!news.newsxs.nl!not-for-mail
Lines: 41
Injection-Date: Fri, 24 Jun 2022 22:12:11 +0200
Injection-Info: news.newsxs.nl; mail-complaints-to="abuse@newsxs.nl"
X-Received-Bytes: 2330
 by: Stef - Fri, 24 Jun 2022 20:12 UTC

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

Re: Cortex-Mx MCUs with SWD access locked

<t96gdv$e2h$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=924&group=comp.arch.embedded#924

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Sat, 25 Jun 2022 10:19:11 +0200
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <t96gdv$e2h$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<nnd$6eee50df$7dbf7e68@8d4ce289928ac989> <t95030$f52$1@dont-email.me>
<nnd$7b7ec9f5$756665f6@fbe2966cbf96e485>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 25 Jun 2022 08:19:11 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d10ddde9fbac6ae5112228b8da5b97d1";
logging-data="14417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ctBgQ1Am0lxrPuPWDDK3G/Wb9adyy4PY="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:DVizpdtTrslB3xIBLk/mOdAzpTc=
In-Reply-To: <nnd$7b7ec9f5$756665f6@fbe2966cbf96e485>
Content-Language: en-GB
 by: David Brown - Sat, 25 Jun 2022 08:19 UTC

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!

Re: Cortex-Mx MCUs with SWD access locked

<t99q8s$3tr9v$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=926&group=comp.arch.embedded#926

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: rbe...@hushmail.com (Reinhardt Behm)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Sun, 26 Jun 2022 14:25:32 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <t99q8s$3tr9v$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 26 Jun 2022 14:25:32 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="aa595dfda2a052242ccdc950541bf2ee";
logging-data="4123967"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TL0786Z0yRue4lrqyUEg9"
User-Agent: Pan/0.146 (Hic habitat felicitas; 8107378
git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:eQLiPMTK+RzMQGhDYdMXdc+E2TA=
 by: Reinhardt Behm - Sun, 26 Jun 2022 14:25 UTC

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

Re: Cortex-Mx MCUs with SWD access locked

<t9bk76$atvl$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=928&group=comp.arch.embedded#928

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Mon, 27 Jun 2022 08:54:30 +0200
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <t9bk76$atvl$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net> <t94hld$u4k$2@dont-email.me>
<1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net> <t94ojc$mvo$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Jun 2022 06:54:30 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0699c37bfdf197c90584bc73fd2ce429";
logging-data="358389"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WHJZx90BdSqZ6FbZs38hVIzClqkKWi2o="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:w5ArhworZ8cmjf4fj8ApxJS7pPE=
In-Reply-To: <t94ojc$mvo$1@dont-email.me>
 by: pozz - Mon, 27 Jun 2022 06:54 UTC

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.

Re: Cortex-Mx MCUs with SWD access locked

<t9bkua$b298$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=929&group=comp.arch.embedded#929

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Mon, 27 Jun 2022 09:06:50 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <t9bkua$b298$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<nnd$6eee50df$7dbf7e68@8d4ce289928ac989>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Jun 2022 07:06:50 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0699c37bfdf197c90584bc73fd2ce429";
logging-data="362792"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tJaC2x1aqSqQlakr3ZfB8zPVkmKSixFg="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:KsY0p8n60GHvXbuuMVP95qUUTc0=
In-Reply-To: <nnd$6eee50df$7dbf7e68@8d4ce289928ac989>
 by: pozz - Mon, 27 Jun 2022 07:06 UTC

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.

Re: Cortex-Mx MCUs with SWD access locked

<t9bltd$bbua$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=930&group=comp.arch.embedded#930

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Mon, 27 Jun 2022 09:23:24 +0200
Organization: A noiseless patient Spider
Lines: 81
Message-ID: <t9bltd$bbua$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<sler5kcfj7pp.q0ov9m80226w$.dlg@40tude.net> <t94hld$u4k$2@dont-email.me>
<1s43q2growcwa.s2laxcbccg5n$.dlg@40tude.net> <t94ojc$mvo$1@dont-email.me>
<t9bk76$atvl$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Jun 2022 07:23:25 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="9cf278c6eadbb4b2c4fa09c15837dc6b";
logging-data="372682"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RXtBaJ+ZCwdt5Kjhytk+LdmAPJaUER18="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:PaRhuGf6+eVosqk8Qq1YBGQ57QI=
In-Reply-To: <t9bk76$atvl$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 27 Jun 2022 07:23 UTC

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.)

Re: Cortex-Mx MCUs with SWD access locked

<t9bm1i$bbua$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=931&group=comp.arch.embedded#931

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Mon, 27 Jun 2022 09:25:38 +0200
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <t9bm1i$bbua$2@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<nnd$6eee50df$7dbf7e68@8d4ce289928ac989> <t9bkua$b298$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Jun 2022 07:25:38 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="9cf278c6eadbb4b2c4fa09c15837dc6b";
logging-data="372682"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/i3bLUo67Evi6xCRa4d6eDrXNNVis2/A8="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:JKtjwgcUNObBFCiR9ZYkT7VAT68=
In-Reply-To: <t9bkua$b298$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 27 Jun 2022 07:25 UTC

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.
>

Re: Cortex-Mx MCUs with SWD access locked

<t9bog9$c24r$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=933&group=comp.arch.embedded#933

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Mon, 27 Jun 2022 10:07:37 +0200
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <t9bog9$c24r$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<t99q8s$3tr9v$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Jun 2022 08:07:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="0699c37bfdf197c90584bc73fd2ce429";
logging-data="395419"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QkfEBr265MJMx8XOihyC3Zeqm/NyFuIo="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:RBMp04gaQErAEeVHIcEFiWj903M=
In-Reply-To: <t99q8s$3tr9v$1@dont-email.me>
 by: pozz - Mon, 27 Jun 2022 08:07 UTC

Il 26/06/2022 16:25, Reinhardt Behm ha scritto:
> 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.

I made the measure you suggested and I found around 20Vac between
debugger GND and board GND *before* plugging them.

After adding a good wire connection between PC metallic case (near a
mounting screw) and board GND, the Vac measured goes near to zero.

Could it be this the cause of issues I observed? I will continue with
this connection and see.

Thank you for your suggestions.

Re: Cortex-Mx MCUs with SWD access locked

<t9chaa$iif7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=934&group=comp.arch.embedded#934

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: rbe...@hushmail.com (Reinhardt Behm)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Mon, 27 Jun 2022 15:11:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <t9chaa$iif7$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<t99q8s$3tr9v$1@dont-email.me> <t9bog9$c24r$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Jun 2022 15:11:07 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="2982f7210861ecf327da192b5989cd9f";
logging-data="608743"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wyiR80eVPpBSkdDPiy1bv"
User-Agent: Pan/0.146 (Hic habitat felicitas; 8107378
git@gitlab.gnome.org:GNOME/pan.git)
Cancel-Lock: sha1:YBS6wi0KwWjbCAcKcBSJJ6O4x/w=
 by: Reinhardt Behm - Mon, 27 Jun 2022 15:11 UTC

On Mon, 27 Jun 2022 10:07:37 +0200, pozz wrote:

> Il 26/06/2022 16:25, Reinhardt Behm ha scritto:
>> 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.
>
> I made the measure you suggested and I found around 20Vac between
> debugger GND and board GND *before* plugging them.
>
> After adding a good wire connection between PC metallic case (near a
> mounting screw) and board GND, the Vac measured goes near to zero.
>
> Could it be this the cause of issues I observed? I will continue with
> this connection and see.
>
> Thank you for your suggestions.

It could not only be, it will be. Imagine you plug the connector, GND is
not contacted first, then the CPU pin sees 20V-AC. That means +20V*sqrt(2)
relative to CPU-GND and -20V*sqrt(2). That is far out of spec. It will
kill the pin.
I had something similar. A colleague had used a 2 wire extension cord for
a soldering station, so no earth connection. I did not know this and
killed the reset input of my controller. When I found out this I
understood why we had several cases of non-functioning boards. The two
wire extension cord was 2$ cheaper than a 3 wire cored. the cost of this
"saving" was several 100$.

--
Reinhardt

Re: Cortex-Mx MCUs with SWD access locked

<t9d8nh$on8i$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=938&group=comp.arch.embedded#938

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Mon, 27 Jun 2022 23:50:41 +0200
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <t9d8nh$on8i$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<t99q8s$3tr9v$1@dont-email.me> <t9bog9$c24r$1@dont-email.me>
<t9chaa$iif7$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 27 Jun 2022 21:50:41 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="3a08c60093efa9873a7c2f5e7ad1ce07";
logging-data="810258"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18g2/QH3zxyYeyY6A8GdKDlW+mhuXG8qjU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:dFPch//uLghVePvi3iq+zxN8Dg0=
In-Reply-To: <t9chaa$iif7$1@dont-email.me>
 by: pozz - Mon, 27 Jun 2022 21:50 UTC

Il 27/06/2022 17:11, Reinhardt Behm ha scritto:
> On Mon, 27 Jun 2022 10:07:37 +0200, pozz wrote:
>
>> Il 26/06/2022 16:25, Reinhardt Behm ha scritto:
>>> 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.
>>
>> I made the measure you suggested and I found around 20Vac between
>> debugger GND and board GND *before* plugging them.
>>
>> After adding a good wire connection between PC metallic case (near a
>> mounting screw) and board GND, the Vac measured goes near to zero.
>>
>> Could it be this the cause of issues I observed? I will continue with
>> this connection and see.
>>
>> Thank you for your suggestions.
>
> It could not only be, it will be. Imagine you plug the connector, GND is
> not contacted first, then the CPU pin sees 20V-AC. That means +20V*sqrt(2)
> relative to CPU-GND and -20V*sqrt(2). That is far out of spec. It will
> kill the pin.
> I had something similar. A colleague had used a 2 wire extension cord for
> a soldering station, so no earth connection. I did not know this and
> killed the reset input of my controller. When I found out this I
> understood why we had several cases of non-functioning boards. The two
> wire extension cord was 2$ cheaper than a 3 wire cored. the cost of this
> "saving" was several 100$.

Anyway in my case the power cord of my PC is connected to a UPS and the
AC/DC that powers the board is connected to earth connection of the grid.

Working with two wires power cords is risky and I learned that in the past.

However this isn't the case now, both PC and board have a good 3-wires
power connection, but there's a 20Vac voltage between the grounds.

Re: Cortex-Mx MCUs with SWD access locked

<nnd$75df048d$3e25cbe7@7fb389c4c5ee1fe7>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=941&group=comp.arch.embedded#941

  copy link   Newsgroups: comp.arch.embedded
Newsgroups: comp.arch.embedded
From: me...@this.is.invalid (Stef)
Subject: Re: Cortex-Mx MCUs with SWD access locked
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<t99q8s$3tr9v$1@dont-email.me> <t9bog9$c24r$1@dont-email.me>
<t9chaa$iif7$1@dont-email.me> <t9d8nh$on8i$1@dont-email.me>
Mail-Copies-To: nobody
User-Agent: slrn/1.0.3 (Linux)
Message-ID: <nnd$75df048d$3e25cbe7@7fb389c4c5ee1fe7>
Organization: Newsxs
Date: Tue, 28 Jun 2022 11:23:49 +0200
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!news.freedyn.de!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp002.abavia.com!news.newsxs.nl!not-for-mail
Lines: 59
Injection-Date: Tue, 28 Jun 2022 11:23:49 +0200
Injection-Info: news.newsxs.nl; mail-complaints-to="abuse@newsxs.nl"
X-Received-Bytes: 3311
 by: Stef - Tue, 28 Jun 2022 09:23 UTC

On 2022-06-27 pozz wrote in comp.arch.embedded:
>
> Anyway in my case the power cord of my PC is connected to a UPS and the
> AC/DC that powers the board is connected to earth connection of the grid.
>
> Working with two wires power cords is risky and I learned that in the past.
>
> However this isn't the case now, both PC and board have a good 3-wires
> power connection, but there's a 20Vac voltage between the grounds.

With both grounded, there cannot be a 20VAC voltage between the grounds.
(unless there is an extreme amount of current ofcourse, but that will
not be the case)

Your PC is a standard desktop? Then the 0V is connected to the earth
connection of the power plug. This is not the case if you have a laptop.
The supply will have an earth connection, but the DC output is floating.

Your AC/DC probably has a similar construction as a laptop supply: Earth
connection on the power plug and a floating DC output.

That there still is a measurable voltage is because of capacitive
coupling in the AC/DC between AC input and DC output (assuming PC is
really grounded). The voltage you measure depends on the impedance of
that coupling and the impedance of your meter.

Just measured 0V to earth on a few supplies here with a volt meter with
input impedance of > 10 MOhm / < 100 pF:

Recent 150W lab supply: 15 mVAC
Old analog 2x40W supply: CH1: 15VAC, CH2: 5 VAC
Recent 10W switching wall wart: 90VAC

Tried to measure short circuit currents as well, but that was not very
reliable as I don't have an AC uA meter here. Currents are too small.

As the current is very low, this should give no problems. There could be
a small surge if you just happen to connect at the peak of that AC
voltage. But the capacitance behind that should be very low, otherwise
the voltage/current measurements should be different. (Haven't drawn out
the resulting schematic and the consequences though).

So you could do a current measurement between the grounds. I would
expect less than 0.1 mA AC there.

But with an isolated supply there also is a chance of static (DC)
buildup. Depending an the capacity to earth this could give and ESD
discharge on connection.

So all this may not be your problem, but connecting an additional earth
between PC and your supply will not hurt anyway. And it has the (small)
possibility of solvng your problem.

--
Stef

TODAY IS INTERNATIONAL CAPSLOCK DAY!

Re: Cortex-Mx MCUs with SWD access locked

<t9elut$12guq$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=942&group=comp.arch.embedded#942

  copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Cortex-Mx MCUs with SWD access locked
Date: Tue, 28 Jun 2022 12:42:36 +0200
Organization: A noiseless patient Spider
Lines: 74
Message-ID: <t9elut$12guq$1@dont-email.me>
References: <t92mgi$d1l$1@dont-email.me> <t93vu7$ukp$1@dont-email.me>
<t949sk$4jp$1@dont-email.me> <t94hhi$u4k$1@dont-email.me>
<t99q8s$3tr9v$1@dont-email.me> <t9bog9$c24r$1@dont-email.me>
<t9chaa$iif7$1@dont-email.me> <t9d8nh$on8i$1@dont-email.me>
<nnd$75df048d$3e25cbe7@7fb389c4c5ee1fe7>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Jun 2022 10:42:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="d89ff26481c4eaac3e55586f592e095b";
logging-data="1131482"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OptwuwUXA4hHs/d9UPJUhubYeybWCExc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.10.0
Cancel-Lock: sha1:WcYbjTMTofyTF01XgfUUlG2RRqE=
In-Reply-To: <nnd$75df048d$3e25cbe7@7fb389c4c5ee1fe7>
 by: pozz - Tue, 28 Jun 2022 10:42 UTC

Il 28/06/2022 11:23, Stef ha scritto:
> On 2022-06-27 pozz wrote in comp.arch.embedded:
>>
>> Anyway in my case the power cord of my PC is connected to a UPS and the
>> AC/DC that powers the board is connected to earth connection of the grid.
>>
>> Working with two wires power cords is risky and I learned that in the past.
>>
>> However this isn't the case now, both PC and board have a good 3-wires
>> power connection, but there's a 20Vac voltage between the grounds.
>
> With both grounded, there cannot be a 20VAC voltage between the grounds.
> (unless there is an extreme amount of current ofcourse, but that will
> not be the case)

The PSU of desktop PC and AC/DC of board are connected to the earth
conductor, i.e. I'm using 3-wires power cord.

But their separate GND aren't connected.

> Your PC is a standard desktop?

Yes.

> Then the 0V is connected to the earth
> connection of the power plug. This is not the case if you have a laptop.
> The supply will have an earth connection, but the DC output is floating.

No, it's a desktop PC, not a laptop.
I don't know why I have 20Vac between GND of J-Link and board.
Maybe the problem is in the UPS that has some failure.

> Your AC/DC probably has a similar construction as a laptop supply: Earth
> connection on the power plug and a floating DC output.

Yes, but I connect GND (0V of DC output) to earth.

> That there still is a measurable voltage is because of capacitive
> coupling in the AC/DC between AC input and DC output (assuming PC is
> really grounded). The voltage you measure depends on the impedance of
> that coupling and the impedance of your meter.
>
> Just measured 0V to earth on a few supplies here with a volt meter with
> input impedance of > 10 MOhm / < 100 pF:
>
> Recent 150W lab supply: 15 mVAC
> Old analog 2x40W supply: CH1: 15VAC, CH2: 5 VAC
> Recent 10W switching wall wart: 90VAC
>
> Tried to measure short circuit currents as well, but that was not very
> reliable as I don't have an AC uA meter here. Currents are too small.
>
> As the current is very low, this should give no problems. There could be
> a small surge if you just happen to connect at the peak of that AC
> voltage. But the capacitance behind that should be very low, otherwise
> the voltage/current measurements should be different. (Haven't drawn out
> the resulting schematic and the consequences though).
>
> So you could do a current measurement between the grounds. I would
> expect less than 0.1 mA AC there.
>
> But with an isolated supply there also is a chance of static (DC)
> buildup. Depending an the capacity to earth this could give and ESD
> discharge on connection.
>
> So all this may not be your problem, but connecting an additional earth
> between PC and your supply will not hurt anyway. And it has the (small)
> possibility of solvng your problem.

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor