ARM Technical Support Knowledge Articles


Applies to: ULINK USB-JTAG Debugger


Information in this knowledgebase article applies to:


I use my own bootloader which is stored at 0x0-0x4FFF in Flash on an LPC2148. My application loads at 0x5000 and up. Everything was working fine until my application became larger than 196K. Now, when I try to load an updated version of my application I get:

Erase Done.
Programming Done.
Contents mismatch at: 00030000H (Flash=04H, Required=07H)
Contents mismatch at: 00030001H (Flash=00H, Required=0DH)
Contents mismatch at: 00030002H (Flash=04H, Required=FFH)

The LPC2148 I use has 512K of Flash so the program should fit. If I completely erase the chip, then reload my bootloader, the application will load without errors. But when I make another application change and try to load without a Full Chip Erase, I get the same error. What causes this odd behavior?


You are trying to use the Start parameter of the Flash Download Setup dialog to control where your application program loads by setting it to 0x0005000 instead of 0x00000000. This can cause the wrong sectors to be erased prior to programming.


Change the Start parameter to 0x00000000. Then, make sure your project links your code and loads it at 0x5000 and up (Options for Target, Target tab). Subsequent loading your application code should not affect your bootload code.

The Start parameter is used for mapping, sector programming and erasing, but not for partial programming. It is usually only changed to define the mapping of external Flash. For internal Flash, it should be mapped according to the data sheet for the device. For LPC2xxx devices, this should be 0x00000000.




Request the files attached to this knowledgebase article.

Article last edited on: 2010-01-20 09:26:57

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential