I used software reset for Kinetis K10. One microcontroller is restart software, and two microcontrollers don't restart. Where is the problem?

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

I used software reset for Kinetis K10. One microcontroller is restart software, and two microcontrollers don't restart. Where is the problem?

2,447 次查看
prog2000
Contributor I

I used software reset for Kinetis K10. One microcontroller is restart software, and two microcontrollers don't restart. Where is the problem?

In debug (on J-Link) restart is correct on  all microcontrollers .

标签 (1)
0 项奖励
回复
6 回复数

1,704 次查看
anthony_huereca
NXP Employee
NXP Employee

Just to double check, are you writing 0x05FA0004 to the scb->AIRCR register?

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0553a/Cihehdge.html 


See this thread for more info: Re: WatchDog doesn't do anything on my K60N512 tower!


-Anthony


1,704 次查看
prog2000
Contributor I

I used next code::

     asm(" CPSID i"); //DisableInterrupts;

     asm(" DSB ");

  i = SCB_AIRCR;

  i &= 0x0000ffff;

  SCB_AIRCR = (i | 0x05FA0004);

  asm(" DSB ");

  asm (" NOP ");

  while(1){};

But K10DX256 do reset and stop (portes are not active). Restart is not doing! Only one microcontroller correctly starts after soft reset.

0 项奖励
回复

1,704 次查看
anthony_huereca
NXP Employee
NXP Employee

Do those boards always boot properly from a POR reset or external physical reset?

Also do you see the reset line toggle when doing the software reset?

-Anthony

1,704 次查看
prog2000
Contributor I

Yes! The problem appeared in boards...

0 项奖励
回复

1,704 次查看
anthony_huereca
NXP Employee
NXP Employee

Hi,

  I don't think I made myself clear enough, my apologies. On the boards that have this software reset issue, do they work properly when you first connect the board to power? Do they work correctly if you press the physical reset button (assuming your board has a reset button)? I want to make sure the boards work correctly in all other reset instances to make sure this is only a software reset problem.

  My other question was if you can use an oscilloscope to look at the /Reset pin when doing the software reset. Does it go low, or does it always stay high?

0 项奖励
回复

1,704 次查看
prog2000
Contributor I

It is feature of debugging.

J-Link established the breakpoint for bootloader beginning. When soft-reset is doing, the processor there is a return for bootloader beginning. The kernel stops a debugger.

It is necessary to remove a board (processor) power (and i need to disconnect the battery) after programming. Then the processor when restart doesn't stop.

0 项奖励
回复