K40 IAR: Software reset

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

K40 IAR: Software reset

Jump to solution
1,778 Views
mf_kappa
Contributor II

Hi

Please advice me howto perform SW reset to the chip: go to c-startup, clear stack, initialize global variables and so on.

(There is also option to force watchdog timeout in order to perfrom reset.)

Thanks

MF

Tags (1)
0 Kudos
Reply
1 Solution
930 Views
dereksnell
NXP Employee
NXP Employee

Hi MF,

There are others posts with the details for executing a software reset in the Kinetis K Series using the Cortex-M4 core.

Check out this post and solution:

View solution in original post

0 Kudos
Reply
2 Replies
931 Views
dereksnell
NXP Employee
NXP Employee

Hi MF,

There are others posts with the details for executing a software reset in the Kinetis K Series using the Cortex-M4 core.

Check out this post and solution:

0 Kudos
Reply
930 Views
mf_kappa
Contributor II

Hi Derek

Thanks for your answer.

I Try to run this code in the post, but it didn't make SW reset:

temp_AIRCR = (unsigned int)scb->AIRCR;

temp_AIRCR &= 0x0000ffff;

temp_AIRCR |= 0x05Fa0000;

  temp_AIRCR |= SCB_AIRCR_SYSRESETREQ_MASK;

  scb->AIRCR = temp_AIRCR;


Do I miss something important?

Another question:

I try to run this routine, from crt0.s file:

__startup();

This routine make SW reset. Can I use it instead of AIRCR register?

Thanks

MF

0 Kudos
Reply