Replies: 1 comment 1 reply
|
Oh, I didn't know that. I think the best way would be to put |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
By default, J-link will clear DWT->CTRL.CYCCNTENA when disconnecting the debug session. It's documented here: https://kb.segger.com/J-Link_Cortex-M_application_uses_cycle_counter . This means in practice that if I disconnect a J-link session (including e.g. a script which flashes, un-halts, and immediately disconnects) the next modm::delay will hang forever. I have found the
SetSkipDebugDeInitsetting works as advertised to avoid this behavior.I don't have a particular opinion about whether it's right for J-link to mess with the DWT setting vs. modm depending on DWT, but I figured I'd share and ask for thoughts: is there anything to be done? Is this a known issue? The behavior is inconvenient and can consume some debug time trying to figure out what went wrong.
Some ideas:
Neither will help if the bit gets cleared during a sleep (unless done on every loop) but at least would minimize the chances of burning an afternoon investigating. Documenting it in the modm::delay module docs would be good to although I doubt people will go there to look.
All reactions