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.
Solved! Go to Solution.
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
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.
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!
-----------------------------------------------------------------------------------------------------------------------
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
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