K60 Continuously resets.

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

K60 Continuously resets.

跳至解决方案
854 次查看
briancarrigan
Contributor I

I can download using PEMicro Multilink Universal (JTAG).

I can step through the code, and the GPIO ports can be configured correctly, as seen by toggling of an external pin.

When I try to RUN the code instead of stepping, it jumps back to reset.

When I remove the JTAG debugger, it resets continuously.

标签 (1)
0 项奖励
1 解答
608 次查看
DavidS
NXP Employee
NXP Employee

In addition to Alice's advice check that watchdog is disabled and that NMI pin has pull-up or has been disabled in the FOPT flash configuration field.

Regards,

David

在原帖中查看解决方案

0 项奖励
4 回复数
608 次查看
briancarrigan
Contributor I

Thank you to Jennie, Alice, and David for your responses. As it happens, there were several things combined to cause the problem. First, there were some assembly directives in the startup code that selected the incorrect architecture. Probably a hold-over from previous ARM code. Second, after I got some visibility via GPIO pins, it turns out that the WDOG was indeed the culprit. On this device (MK60DN256) it is necessary to UNLOCK the WDOG almost immediately after a system reset. I had the WDOG reset code in the initial setup routines (in C) but they were never getting exercised because the WDOG was kicking in sooner. I moved the WDOG config code right to the beginning of the startup assembly code, and this fixed the problem. However, it still raises the question of why the debugger could step through the code without invoking the WDOG.

I still have some bus-error problems in startup, but putting in the port-pin debug code should help find those easily.

Once again, thanks for the help from the community.

0 项奖励
608 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Brian.

In addition to Alice and David, I suggest you check RCM_SRS register to check what caused the MCU to reset.


Have a great day,
Jennie Zhang

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
609 次查看
DavidS
NXP Employee
NXP Employee

In addition to Alice's advice check that watchdog is disabled and that NMI pin has pull-up or has been disabled in the FOPT flash configuration field.

Regards,

David

0 项奖励
608 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Brian,

What about your code , especially  the main function ?

And what about the chip number , you can send your project to me ,

i will test it on my side .

BR

Alice

0 项奖励