An application executing under PROG mode is perfectly running for days and days. The same in RUN mode bugs after some minutes or some hours.
What about the serial A port management. Is it running in the same manner in RUN and PROG mode (I mean same execution time for printf execution), or, is it different since usaually not used in RUN Mode ?
I changed the core and the starter kit Board with no change at all.
My guess is that there’s a bug in your software that’s timing dependent, or dependent on memory layout.
Are you running the same installed code when switching to RUN mode, or are you compiling to .BIN and installing that? Switching to a “release” .BIN file can result in memory layout changes in addition to timing changes.
One difference of PROG mode is that code runs under the debugger, and is slightly slower. I think there’s more of a slowdown if you compare running in Dynamic C versus compiling your code to a .BIN file and installing it with RFU. Compiling to the board from Dynamic C and then running without the debugger attached will still incur some overhead (the compiler inserts RST28 instructions that aren’t present in the .BIN file), but without the debugger attached that RST28 overhead is minimal.
What does the bug look like? Is your program just crashing? Is it possible to instrument the program in some way to identify where the crash happens?