Raghav Sarma

Time delays necessary when writing to Flash memory?

Discussion created by Raghav Sarma on Jan 15, 2007
Latest reply on Jan 16, 2007 by Alban Rampon
Hi all,
I'm using flash routines downloaded from the Freescale website to erase / reprogram flash memory. My applications calls the flash erase command repeatedly in a loop incrementing the address pointer by 0x200 (the flash sector size) each time, so that the next secotr is erased until the entire region to be erased is erased. I get an error however when the erase flash routines are called.
On examining (taking care not to interrupt the actual flash procedure with the BDM) this with the debugger, I've noticed that there is always a breakdown on either the second or the third sector of flash that needs to be erased.
One thought was that this may be because a certain time is required for a flash erase command to complete and maybe we need to put in a delay between successive calls to erase flash sectors. Could this be a problem?
Any other suggestions what could cause such behaviour?