K60 Continuously resets.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

K60 Continuously resets.

ソリューションへジャンプ
852件の閲覧回数
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 解決策
606件の閲覧回数
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 返答(返信)
606件の閲覧回数
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 件の賞賛
606件の閲覧回数
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 件の賞賛
607件の閲覧回数
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 件の賞賛
606件の閲覧回数
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 件の賞賛