Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Flash write errors

2006-01-25 by Guillermo Prandi

Hi. Are Flash write errors normal, i.e. a known issue? When 
programming my LPC2138 using the isp21lpc utility, every now and then 
I get a write error; a second attempt always succeed. This happens 
roughly once every 100 programming attempts. I thought it could have 
been a problem with my serial cable or some other hardware problem, 
but now I added an IAP function to my test program and I am getting 
errors too (i.e., saved data differs from the source data, although 
the IAP copy ram to flash command returns CMD_SUCCESS). I checked 
everything and I think I covered the normal requisites:

* Prepare the Flash sector for writing (for erase).
* Erase the intended block.
* Prepare the Flash sector for writing.
* Write a 256 bytes block.

At each IAP call I:

* Disable all interrupts.
* Provide the right clock in KHz to the IAP (10 MHz-->10000).

I am using an external 10 MHz crystal, and no PLL.

Even the power supply seems solid; for what I've seen with my 
osciloscope, VDD never gets below 3.3V (it is normally at 3.334V).

Oddly enough, I am NOT getting any dabt exceptions; I would have 
expected that reading from a corrupted sector of the flash memory 
would have raised a dabt exception, which doesn't seem to be the 
case. Also, reads from the flash are consistent; i.e., even when I 
get the wrong data in the flash sector, the 'wrong' data is stable 
until erased. Also, the 'wrong' data is *similar* to the 'right' 
data; i.e., if I want to save "HELLO", I might get "HELLO" (correct) 
or perhaps "H??L?" (incorrect).

Any ideas?

Guille

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.