Flag Status: SRS1_JTAG

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

Flag Status: SRS1_JTAG

跳至解决方案
1,007 次查看
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 解答
777 次查看
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 回复数
778 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

777 次查看
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 项奖励
回复