K40 IAR: Software reset

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

K40 IAR: Software reset

跳至解决方案
2,531 次查看
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

标记 (1)
0 项奖励
回复
1 解答
1,683 次查看
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 项奖励
回复
2 回复数
1,684 次查看
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 项奖励
回复
1,683 次查看
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 项奖励
回复