2013-12-09 08:03 AM
I am using STM32f4 ,fat fs & SPI mode to interface to SD card every thing works fine .but i want to use DMA to increase read performance.should i go for SDIO to achieve a little more speed or
is there any way to tweak fat fs to use DMA in SPI mode. #dma #spi #sdcard #sdio #sdcard-fatfs #tags-are-pointless #sdcard-stm32f4-sdio-fatfs #fat-fs2013-12-09 08:49 AM
I guess my question would be why wouldn't you have started with SDIO?
The original SD/MMC class cards are inherently slower than ones supporting SDHC. The read/write speed of the cards is an important consideration. The faster ones are also more expensive. SDIO is going to give you 4x the performance of anything you can do with SPI2013-12-09 09:42 PM
Thank's clive1 for your quick response. i have one more question. In fat fs even if i use dma i have to wait for complete DMA transfer . i know this will not free my cpu for other applications.
if i go for sdio will i have to wait for completion in a multiblock read ?2013-12-09 10:05 PM
Yes, and that's why you'd seek to use multi-threaded programming if sitting in non-productive spin-loops is a concern. You'll spend less time waiting if the transfer occurs quicker, and the card is faster. If your task is IO limited, at some point your through-put is going to bottle-neck as you are serializing access to the media.
2013-12-09 10:30 PM
Thank's clive1 .i think i should go for multi threaded programming and switch from spi to sdio
2014-04-12 12:36 PM
Hi Clive,
Would like to know what you think about something. For a project I currently need to write data to a microSD card from a discovery board, and I realise I may use either SPI or SDIO for that interfacing. As you've said, SDIO is faster, and from the STM32F4 ref manual seems to be more like dedicated hardware for talking to SD cards when compared to SPI. On this basis I feel that I should definitely use it. However, I've been reading a guide for getting started with the SD card breakout board that I want to use (adafruit), and they say that SDIO is not practicle/easy/a good idea because it involves signing non disclosure forms: https://learn.adafruit.com/adafruit-micro-sd-breakout-board-card-tutorial/look-outI myself haven't been able to find out why they've said that. Would you happen to know? I've seen other projects that use SDIO that didn't seem bothered about that such as this one http://thehackerworkshop.com/?p=1103thanks,Jonathan2014-04-12 03:30 PM
While SD and FAT stuff may be encumbered with licensing and patent issues, I'm pretty sure most materials required to implement it, or use existing code, can be done without NDA, or frankly half the drama portrayed in the aforementioned threads.
Sockets on eBay for $5-6, or use the STM32F4-DIS-BB breakout board.2015-10-29 10:48 PM
Is that possible to Write an SDCard at raw level without using FAT File system? if yes, how?
2015-10-30 02:48 AM
Is that possible to Write an SDCard at raw level without using FAT File system?
Of course. That's what the FAT FS implementation itself does. And I have frequently prepared SD cards for embedded Linx boxes, which involved reformatting to ext3/ext4, and writing files.if yes, how?
Check the, and available sources for FatFS implementation. Then, decide if it's worth the effort, and if you could do better. It could become a little complex, and this is exactly what a filesystem is designed to hide from you ...
2015-10-30 05:38 AM
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/SDIO%20and%20SD%20fat%20access%20example&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/AllItems.aspx¤tviews=18531]Cross-posted in this thread
Review the code below the diskio.c abstraction, and the examples for SDIO in the SPL for the F4