Content originally posted in LPCWare by CodeRedSupport on Thu Sep 09 06:15:01 MST 2010
Not quite, but almost. Remember you are writing to flash, and you will be writing to sectors not bytes.
If you switch to the MCU debug console after you load your image into the debugger, one of the messages you will see will be along the lines of....
Quote:
Writing 15524 bytes to 0000 in Flash (assumed clock: 4.0MHz)
Erased/Wrote page 0-3 with 15524 bytes in 1829msec
The key part here is that the debugger is telling you that it has erased flash sectors 0, 1, 2 and 3 (ie the first 16384 bytes of memory) before it then wrote in 15524 bytes.
Regards,
CodeRedSupport