CompactFlash write speed

Hi all! I'm designing a high speed datalogger that should store a continuous data stream (about 2MB/s) for about 30 minutes. I'm using a Compact Flash card to store data samples (no FAT, just raw data with a continuous addressing, in order to keep all as fast as possible). The CF I tested is rated 66X (i.e. about 10MB/s), and the micro (an AVR) can sustain a write speed greater than 4MB/s. The problem is that the CF seems to have very long execution time, so even if I'm very fast to transfer commands and data blocks, I have to wait *many ms* before getting the card ready again for the next command. My question is: does anybody succeded in getting a sustained write speed greater than 2MB/s with a CF card? If yes, how? What is the most appropriate sequence of commands/operations: write sector, write sectors, erasing before writing, writing without erasing, using contiguous addressing, or what else?

Thanks in advance, Antonio

P.S. I'm using True IDE mode, 8 bit data, PIO mode (not DMA). But as I said the limit is not the interface but the card "execution" time...

Reply to
A.D.
Loading thread data ...

I am using the compact flash with BlackFin system and with the good cards I am getting the sustained read/write performance at the order of

25 MBytes/sec. Just about every modern compact flash card from WalMart can do 10MB/s at least. I am not using the DMA/UDMA modes, all done with the conventional sectors read/write operation. The 25MB/s is the limitation of the system; the CF itself can go faster then that. Yes, there is a long latency at the beginning of the commands. For the best performance, you should use the maximum block size, and align your read/write flash operations on the block size.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Thank you for the info! Surely I'm doing something wrong, since I observe huge latencies (up to 200ms!)... Maybe these are something like timeouts and not command latencies...

Thank again, Antonio

Reply to
A.D.

Hi Antonio, Is this problem resolved? I am also having the same problem. Most of the time the write takes

200-300 ms. I am running this in true-IDE mode and using DMA for the data transfer. DMA happens very quickly but the CF will be in busy state for more than 200 ms.

Any help really appreciated

Thanks Prasanna

Reply to
prasannahm

Hi Prasanna, all CF I tested seem to have a huge busy period (200/300ms) following the very first writes, but then it will decrease somewhat to an avarage of few ms. These busy periods and their length are quite unpredictable (even using the same commands in the same sectors), but are strongly dependent on the specific card brand and speed rating. When using faster and more expensive cards (>133x) busy periods are shorter are less frequent. However, in order to avoid the problem the only solution is to use lot of buffering...

Bye, Antonio

Reply to
A.D.

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.