2015-11-26 12:49 AM
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.
2015-12-20 09:01 AM
I can achieve to writing speed of more than 10MBps by chang Q of the PLL to 5. in this situation I check the SDIO_CK. its about 35MHz.
I write on this SD card in my pc with speed of more than 20MBps. in addition in othe SD that is Class 4, in PC I Write on it with speed of about 10MBps but in ST board with this program, I can write on it with speed of about 5MBps. I think there is another option that I can Increase writing speed!!2015-12-20 09:08 AM
Ok, you initialize it in 1-bit mode and transition to 4-bit when you enable the wide bus.
Initialization should be done at 400 KHz, it goes to 24 MHz later. There is an errata preventing the use of BYPASS mode. To get beyond 24 MHz you need to change the Q-tap of the PLL which is usually at 48 MHz (ie 24 x2)2015-12-22 04:39 AM
in my program, is it necessary that I use ''SD_WriteMultiBlocks'' function, each time I want to write on SD? I think this function set SDIO and DMA each time. can I write faster? is there any way that it write automatically? for example it trigger with timer and write automatic.
DMA can trigger with TIMx but here it connect to SDIO! I'm made confused!2015-12-22 05:20 AM
These are things you'll need to experiment with yourself. I don't think they will materially improve the write bandwidth, which needs to exceed the rate at which you are generating data.
2015-12-26 10:01 PM
although it's a question for me that why in pc I can write on SD with 20MBps and in my board that's about 13MBps, this speed is OK.
in addition I use DMA for reading GPIO, it has high speed too.the problem is that both of GPIO and SD use DMA2!! any idea to solve this problem? I check TIM1 interrupt and EXTI, I couldn't read GPIO in ther interrupt routine!2015-12-26 10:07 PM
I can reduce my sampling rate to 7MSps. thats why I said 13MBps is OK for SD speed writing.
2015-12-27 06:10 AM
It's pretty hard to do an apples-to-apples comparison of the bandwidth/resources of a 3 GHz PC with gigs of RAM, against a micro-controller running at l68 MHz (ie ~20x slower)
The PC is probably clocking the SDIO bus at 50 MHz, and caching/writing 128KB blocks, on buses that can provide hundreds of MBps in bandwidth. May be there is something in the MMC/SD specs that explains what's required to sustain Class 10 streaming.