Atmel flash memory issue, maybe?

Hello folks,

I am using Atmel flash AT49BV322DT in a custom dsp board i am building. the dsp is a TI 320DM641. I have written test software that erases, writes and reads from the flash.

When I send the sequence of erase commands to the flash, I am able to see write signals on the scope. Shortly thereafter, I also see the Ready/Busy/ output from the flash go low, as expected. Same thing while writing. I cam also read the data back from the flash. so far, so good.

yesterday, all of a sudden, after half a day's experimenting with flash timing, the thing stopped working. the READY/BUSY signal would not respond to any command sequence.

The only thing I can think of is that one must __ALWAYS__ do an erase before a write. While exprimenting with flash timings, I performed quite a few (8-10-20) writes. unfortunately, i did not scope the signals during each write, so i do not know exactly when the thing stopped working.

So, my question is: do I always need to erase before reprogramming the flash? Is this true of all flash memories?

tomorrow i am going to replace the chip.

Any help will be greatly appreciated.

Thanks!

--Vishnu

Reply to
Vishnu Swaminathan
Loading thread data ...

Not the whole flash, but yes u have to erase those specific sectors where you are going to rewrite. If you use any of flash writers, they actually erase the required sectors before reprogramming.

Reply to
Sudip

Thanks Sudip.

But is rewriting without erasing so bad that it will destroy the entire flash chip?

--Vishnu

Sudip wrote:

Reply to
swams

Not at all. What about reading the Data Sheet?

Reply to
Adrian

Production code in automotive engine controllers rewrites flash without erasing. We use certain bytes to indicate certain areas are erased, programming in-progress, programmed, and invalid. As long as we program

0's to bits which are 1's, there is no problem. The four states above would be:

$FF -> $BF -> $AF -> $AB

We allocate fixed size blocks in a flash sector and use the bytes to indicate the state of the blocks. When all the blocks in a sector have been used, we transfer to a second sector and erase the first sector. The controller writes a new block every power-down and invalidates the previous block.

~Dave~

Reply to
Dave

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.