Flag Status: SRS1_JTAG

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

Flag Status: SRS1_JTAG

ソリューションへジャンプ
1,035件の閲覧回数
albertmartin
Contributor II

Good Mornig:

I'mtry tu check the SRS1_JTAG flag of MK60FN1M0VMD12 by Keil environment.

this flag is inside of System Reset Status Register 1.

And when I am debugging with ULINK 2 by UVision, this flag is not activated.

That is the raison?

for check the debug mode is activated, Who can i Used this flag?

There is another way to check if jtag is connected?

Thank you very much.

It can be very userful.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
805件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Albert Martin:

I did not get the first part of your question very well. But if you want to detect when the K60F MCU is in Debug mode, I guess you can use the ARM register DHCSR (Debug Halting Control and Status Register), which is at address 0xE000EDF0. Example below:

#define DHCSR_REG (*(uint32_t*)(0xE000EDF0))

int main (void)

{

  if(DHCSR_REG & (uint32_t)(0x1))

  {

    // Debug mode

  }

  else

  {

    // Standalone mode

  }

}

I hope this helps!

Regards,

Jorge Gonzalez

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

元の投稿で解決策を見る

2 返答(返信)
806件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Albert Martin:

I did not get the first part of your question very well. But if you want to detect when the K60F MCU is in Debug mode, I guess you can use the ARM register DHCSR (Debug Halting Control and Status Register), which is at address 0xE000EDF0. Example below:

#define DHCSR_REG (*(uint32_t*)(0xE000EDF0))

int main (void)

{

  if(DHCSR_REG & (uint32_t)(0x1))

  {

    // Debug mode

  }

  else

  {

    // Standalone mode

  }

}

I hope this helps!

Regards,

Jorge Gonzalez

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

805件の閲覧回数
albertmartin
Contributor II

Perfect.

Thank you very much for all.:smileyhappy:

It is just what I needed.

my problem is, I did not find this information in the manual (K60P144M150SF3RM.pdf)

Thank you very much.

you are the best!.

0 件の賞賛
返信