Content originally posted in LPCWare by fsteff on Fri Jan 04 03:21:24 MST 2013
Hi pcproa,
Did you find a specific solution to your problem (I tried to look at your sources, but didn't see it).
I'm experiencing the same problem, except that I'm running from the main Osc at 12Mhz. (But have also tested at 96MHz from the MainPLL)
I have positively verified that the problem occurs when using the CopyRAM2Flash() function.
The really suspicious problem I have, is that I have found an indirect way to always make it work, and to always make it fail, which really puzzles me:
There are three methods for me to place the initial bootloader and user-app in the LPC1788.
1. Use the internal bootloader with flash magic or similar serial programmer.
2. Use RedProbe+ (JTAG probe) and the "Program Flash" option inside RedSuite.
3. Use RedProbe+ (JTAG probe) and perform a debug on the (release) source, then detaching the debugger.
In all of the above cases, I've used flash magic to extract the entire flash, and I can see they all have 100% identical contents.
Yet,
In case 1, it fails 50% of the times (If it fails first time, it always fails. If it works first time, it always works.).
In case 2, it never fails.
In case 3, it always fail.
All cases has been tested from both cold and warm boot, but there's no difference.
This makes me suspect some sort of persisted setting that I'm missing to deal with.
--
Fsteff