Skip to contentSkip to conversation

readback after write

DISCUSSION [email protected] 1 participant 1 message Feb 28, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi,

I have a general question regarding FLASH memories (It does not have to do anything directly with linux MTD).
I have connected SPI serial flash to my embedded device. Due to slow speed provided by the device I had to drop JFFS2 or similar flash fs in favor of accessing the flash memory in raw mode (using stdio I/O functions). It works nice and much faster than JFFS2.

What I would like to add to my code is read-back operation after write operation, to make sure I haven't overwritten any of the date already present on the flash. My intention was to:
- open fp for read and write
- (erase the sector if needed)
- write data to flash
- seek back
- read data back and compare write and read buffer byte-by-byte

This could have major performance downside considering I can transfer (R/W) 64K of data in ~700ms to/from the device (SLOWWW). Device is sized at 4Mbit. In the worst case this would probably double (triple?) R/W times for single operation, which is why I would like to ask if anyone has any information/algoritm for such things?

regards,
hinko

Signature · 7 lines
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenija
Tel. +386 (0) 4 280 66 37
E-mail: [email protected]
Http: www.cetrtapot.si