K22 detect if in jtag debug mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

K22 detect if in jtag debug mode

跳至解决方案
937 次查看
rubenjonsson
Contributor II

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.

标签 (1)
1 解答
800 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Ruben Jonsson:

The ARM register DHCSR should help you to achieve what you need. See the next discussion about the same topic:

Flag Status: SRS1_JTAG


Best regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
2 回复数
800 次查看
rubenjonsson
Contributor II

Works great, thanks.

801 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Ruben Jonsson:

The ARM register DHCSR should help you to achieve what you need. See the next discussion about the same topic:

Flag Status: SRS1_JTAG


Best regards!
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复