If it starts up correctly in debug mode, but not in stand-alone mode, the possible reason may be:
1) Watchdog reset. Is the watchdog being serviced? Please first disable the watchdog in your application and test whether it makes any difference.
2) Incorrect interrupt vector. In debug mode, the program starts from Entry Point which is set in the Target setting. While in stand-alone mode, it starts from vector table.
Please check whether the vector table is placed at the correct address in program flash. And the reset vector is correctly calling the start up routine.
3) Lost data in RAM. Please check the linker command file and MAP file, whether there’s code or initialized data are placed in RAM, please place them in flash.
4) Initialized global variable, whether they are initialized correctly. This is another difference between running in debug mode and stand-alone mode. When program before debugging, CodeWarrior will erase the memory before writing, but in stand-alone mode.
Fiona Kuang
Technical Information & Commercial Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------