<blockquote>
<blockquote>
<p>You mean setting pm?</p>
</blockquote>
<p>I tried that but I'm not able to reproduce whatever state the board was in where it couldn't be flashed</p>
</blockquote>
<p>I think that's from one of two reasons:</p>
<ol>
<li>some mcus keep the SWD hardware powered on until the next power-on-reset any time the SWD hardware has been utilized since the last power-on-reset (efm32 does this)</li>
<li>some mcus don't power off the SWD hardware even in low power modes for your convenience (kinetis won't de-power SWD in pm 1 but it does in pm 0)</li>
</ol>
<p>It's a bit of a crap shoot in that there is no standard among the variety of mcus in terms of when SWD should be powered versus not. I don't have experience with stm32 but I'd suggest power-cycling after flashing a firmware that calls pm_set(0) in case it behaves like efm32. If that doesn't do the trick, only the reference manual can say what will.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12158?email_source=notifications&email_token=ABE7WYG2Y6IBQLFIA6VGQQDQKSJGJA5CNFSM4ITCN5H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GEDII#issuecomment-533479841">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDPFYZ4HU73RSID37DQKSJGJANCNFSM4ITCN5HQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYDXT5YME3PLKINDA2TQKSJGJA5CNFSM4ITCN5H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GEDII.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12158?email_source=notifications\u0026email_token=ABE7WYG2Y6IBQLFIA6VGQQDQKSJGJA5CNFSM4ITCN5H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GEDII#issuecomment-533479841",
"url": "https://github.com/RIOT-OS/RIOT/pull/12158?email_source=notifications\u0026email_token=ABE7WYG2Y6IBQLFIA6VGQQDQKSJGJA5CNFSM4ITCN5H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7GEDII#issuecomment-533479841",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>