The problem occurred whilst using the AT91SAM3U-EK & ULINK Pro JTAG probe @48MHz.
A simple program (main loop incrementing a loop count and outputting the loop count to the serial port using 'printf()') is using internal ROM, internal RAM for stack, and PSRAM for the heap. The Static Memory Controller is setup using a debug .ini script and the program loaded using the debug LOAD command. (Script provided by ATMEL to setup the Static Memory Controller to run @48MHz). The uVision enters debug mode and loads the program OK. The program runs OK but after a random amount of time the debug mode is exited, however the program continues to execute normally. When the heap is located in internal RAM the debugger behaves correctly (overnight run).
Tools & Environment -------------------
uVision V4.20.03.0 ToolChain: MDK-ARM Professional Version 4.20 C Compiler: ARMcc.exe V4.1.0.644 Linker: ARMLink.exe V4.1.0.644
CPU DLL SARMCM3.DLL V4.20 Dialog DLL: DARMSAM3.DLL V1.09 Target DLL: BIN\ULP2CM3.DLL V2.50 Dialog DLL TARMSAM3.DLL V1.08
ULINK Pro Settings ------------------
Device Family Cortex-M Firmware Version V1.50 SWJ-checked PORT-JTAG Max XClock 1MHz Debug Connect -Normal Reset -Autodetect Reset after Connect -Checked Cache Options Cache Code -Checked Cache Memory -Checked
Target ------ AT91SAM3U4E Device ATSAM3U-EK Board MCLK 48MHz IROM1 0x80000 0x20000 IRAM1 0x20000000 0x8000 PSRAM 0x60000000 0x100000