<p>I remember that debugging with sleep mode could require some debugger special operation.</p>
<p>For the IoT-LAB tutorials we were recommending to remove <code>wfi</code> as it was turning the <code>JTAG</code> off <a href="https://www.iot-lab.info/tutorials/debugger-on-m3-nodes/" rel="nofollow">https://www.iot-lab.info/tutorials/debugger-on-m3-nodes/</a><br>
And we never put a workaround by default due to not really understanding the consequence.</p>
<p>It could be configured in┬áthe <code>openocd</code> script and they configure the <code>CR</code> register in this example as you do:<br>
<a href="https://sourceforge.net/p/openocd/mailman/message/33251349/" rel="nofollow">https://sourceforge.net/p/openocd/mailman/message/33251349/</a></p>
<p>And to connect to a sleeping device it may need to <code>reset</code> the device. <code>connect_assert_srst</code> This is why it fixes the flasher getting stuck I guess. <a href="https://visualgdb.com/tutorials/arm/stm32/sleep/" rel="nofollow">https://visualgdb.com/tutorials/arm/stm32/sleep/</a></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/issues/11820?email_source=notifications&email_token=ABE7WYBQZPR3C2JCLTFBTTTP6YATJA5CNFSM4H7EJQMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZT5CCY#issuecomment-510120203">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDSAHDQSFJBFLLFLK3P6YATJANCNFSM4H7EJQMA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYCYOURUPPGJSTNVCSDP6YATJA5CNFSM4H7EJQMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZT5CCY.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/issues/11820?email_source=notifications\u0026email_token=ABE7WYBQZPR3C2JCLTFBTTTP6YATJA5CNFSM4H7EJQMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZT5CCY#issuecomment-510120203",
"url": "https://github.com/RIOT-OS/RIOT/issues/11820?email_source=notifications\u0026email_token=ABE7WYBQZPR3C2JCLTFBTTTP6YATJA5CNFSM4H7EJQMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZT5CCY#issuecomment-510120203",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>