K22 detect if in jtag debug mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K22 detect if in jtag debug mode

ソリューションへジャンプ
862件の閲覧回数
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 解決策
725件の閲覧回数
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 返答(返信)
725件の閲覧回数
rubenjonsson
Contributor II

Works great, thanks.

726件の閲覧回数
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 件の賞賛
返信