K60 Continuously resets.

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

K60 Continuously resets.

Jump to solution
1,181 Views
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.

Labels (1)
0 Kudos
Reply
1 Solution
935 Views
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

View solution in original post

0 Kudos
Reply
4 Replies
935 Views
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 Kudos
Reply
935 Views
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 Kudos
Reply
936 Views
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 Kudos
Reply
935 Views
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 Kudos
Reply