Flag Status: SRS1_JTAG

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flag Status: SRS1_JTAG

Jump to solution
799 Views
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.

Labels (1)
Tags (1)
0 Kudos
1 Solution
569 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
570 Views
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!
-----------------------------------------------------------------------------------------------------------------------

569 Views
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 Kudos