cancel
Showing results for 
Search instead for 
Did you mean: 

High speed Sampling and saving on SD card

Javad
Associate III
Posted on November 26, 2015 at 09:49

hello

I need help about my new project. I want to sample from 2Mhz signal with 10Mhz sampling rate about a minutes by a 12bit parallel external ADC (AD9035). since the number of samples will be too many, I need to save them on sd card so that after 1 minutes I use them.  now I want to know how can I write my samples on SD with high speed (more that 20 M Byte/s). using DMA, is good idea?

I am pleased if you help me and suggest any algorithms.

I use STM32f407.

26 REPLIES 26
sanaz
Associate II
Posted on November 26, 2015 at 14:53

I don't think the F4 has the horse power to achieve this. I definitely feel the 4-bit SDIO will not hit anywhere near 20 MBps writing.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Javad
Associate III
Posted on November 26, 2015 at 15:28

I found SDHC with writing speed of 40 MB/s (Sony 8GB UHS-I 94MB/Sec SDHC Card).  can I write on it with 20MB/sec by DMA?  

Posted on November 26, 2015 at 16:39

I would be surprised if you could.

Yes, you'd use DMA to hit the bandwidth limit, but I think that's much lower than you think it is. The card is only one factor in the system performance.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Javad
Associate III
Posted on November 27, 2015 at 10:43

many thanks Clive for your answer. I think I can say its result till Tuesday.

Javad
Associate III
Posted on December 09, 2015 at 07:02

unfortunately, I could not found microSD with that speed! but I found Compact flash. it has high speed and I can run it with FSMC.

now I think to this algorithm: I can read pins with DMA with 10Mhz frequency that trigger with TIM1 and I writ them in CF by FSMC.

any idea about this algorithm?

in addition I  found FPGA. I can get samples from ADC and write them to DRAM with FPGA and then transmit them to my ST and analyse them. but in this way the cost is a little high.

 

Posted on December 09, 2015 at 16:47

I think it is a bit flawed. You wouldn't be writing to the CF at 10 MHz, you are SAMPLING at 10 MHz. You need to write to the CF faster than that, as you will have command overhead as you interact with it. I'd expect you'd just use a memory-to-memory DMA over the FSMC to get the data blocks to the media as fast as possible.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 09, 2015 at 16:50

Can you use the FPGA to provide the data transfer to an SDIO or CF directly, and just have the STM32 manage them?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Javad
Associate III
Posted on December 10, 2015 at 11:18

yes, you're right clive, I have to write faster than 10MBps on memory.

yes I can use FPGA (OR CPLD FOR ITS LOWER COST) to write data in memory. in addition if I use fpga, I can connect it to DRAMs that have more capacity with low cost. maybe it's more better for future of my design.