Is there an easy way to detect if the program in a K22 is running from the debugger over the JTAG interface or if it is started standalone?
I have added some LEDs to the jtag interface pins which I want to use when not running from the debugger. I could check the _DEBUG define at compile time to enable the GPIOs instead of the JTAG interface but I would rather be able to do this at runtime so it works with any build.
Solved! Go to Solution.
Hello Ruben Jonsson:
The ARM register DHCSR should help you to achieve what you need. See the next discussion about the same topic:
Best regards!
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Works great, thanks.
Hello Ruben Jonsson:
The ARM register DHCSR should help you to achieve what you need. See the next discussion about the same topic:
Best regards!
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------