cancel
Showing results for 
Search instead for 
Did you mean: 

sdio fatfs speed problem

elec_st
Associate III
Posted on January 22, 2014 at 20:31

i use fatfs and i read at about 200to300KB/SECOND

 it's very low speed . i test sd card speed from computer and it's speed reading 12.5MB/SECOND

how to speed up sd card reading i want about 5MB/sec are this hard ?

#metoo-maybe
25 REPLIES 25
rbordalba
Associate
Posted on April 30, 2014 at 13:36

Hi,

I tried to use 1-bit mode in the STM32F429I and the speed was almost the same. I also implemented the same code to the STM32F407-Discovery with the STM32F4-DIS-BB and the speed was also low.

Now I will try to use your code to test the speed with the STM32F407 + STM32F4-DIS-BB. I see there are some modification in the ''stm32f401_discovery_sdio_sd'' library so I will use it with my code.

Thank you for the code and help,

Ricard

sh2
Associate II
Posted on September 19, 2014 at 11:59

Hello Clive,

I tried to port your Keil project to CooCox but I still get SD_CMD_RSP_TIMEOUT error from main->f_open->chk_mounted->disk_initialize->SD_Init->SD_PowerON.

I use STM32F407VGT on Discovery board. SD card wiring is like https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/DispForm.aspx?ID=23354&RootFolder=https%3a//my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/ST32f4discovery%2bsdcard%2bfatfs%20problem

Without Card detect pin. Wire length is ca. 6-7cm.

Any Ideas what causes this error. Here is my CooCox project too.

best regards,

Stefan

________________

Attachments :

microSD1.rar : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hzss&d=%2Fa%2F0X0000000bQi%2FwmN8g3VQCr0Z.IH7hmRoD.o9D34yDQUCCF_8lKqx1YU&asPdf=false
Posted on September 19, 2014 at 13:58

I'm not much of a CooCox user, but I'd suspect you're using startup_stm32f4xx.c and not my .s file. Consequently SystemInit() is not being called (per CMSIS), and the PLL is not running. The SDIO requires the PLL Q tap clock. The normal CooCox hack is to call SystemInit() in main()

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sh2
Associate II
Posted on September 19, 2014 at 16:03

Hello Clive,

thank you very match! You are right. Now your code runs without any problems. I achieved 5,3 MByte/s on 32G SDHC Card writing 32K blocks. 

sforumk
Associate
Posted on November 20, 2014 at 06:38

i have problem like your and reading, can you send me keil project file? sforumk@gmail.com thanks.

Posted on November 20, 2014 at 17:58

I believe I've posted a Keil  STM32F4-Discovery + STM32F4-DIS-BB version to the forum before, please check other postings.

Why don't you describe your board and configuration, and what exact problem you are facing? I don't provide private email support, the purpose of using the forum is that I don't have to put everyone's fires out individually.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..