Skip to main content
mikewilliamson9
Associate II
September 6, 2009
Question

SDIO + FAT16/FAT32

  • September 6, 2009
  • 49 replies
  • 8123 views
Posted on September 06, 2009 at 03:51

SDIO + FAT16/FAT32

#microsoft:-broken-for-sure
    This topic has been closed for replies.

    49 replies

    dan10
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 12:54

    http://fullfat-fs.co.uk/ try this, its open source, and I've had excellent performance with this.

    lmullane2
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:54

    Hi,

    I have downloaded and compiled the SDIO_DosFS_V02.zip project that relaxe

    was working on. Must say well done to Relaxe on that , its the only SDIO FAT example I have found so far. It compiles and works ok for me.

    I can read and write files to my SDCard.

    My only problem with it is that its slow to write out 1Meg of data.

    Takes about 50 seconds. Its a lot quicker to read. Am I doing something wrong or is there another example where a write of 1Meg would be quicker.

    thanks

    Liam.

    [ This message was edited by: lmullane on 08-06-2009 15:44 ]

    fu0653
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:54

    Hi,relaxe.

    I used your SDIO_DosFS_V01 code,

    before I used Transcend 1G SD card is OK,

    but now i used Transcend 2G SD card fail,

    I entered the Debug model to see

    my errorstatus is 0x2A,

    always error in

    while (!(status & (SDIO_FLAG_CCRCFAIL | SDIO_FLAG_CMDREND | SDIO_FLAG_CTIMEOUT)))

    {

    status = SDIO->STA;

    }

    I have no idea to resolve this problem,

    Will give me some tips to resolve this problem do?

    I would like to know how to solve the problem,

    Please discuss with me.

    Thank you very much!!

    it is my Email: fu0653@gmail.com

    or MSN: fu0653@yahoo.com.tw

    thanks!!

    [ This message was edited by: fu0653 on 06-09-2009 07:28 ]

    [ This message was edited by: fu0653 on 06-09-2009 08:38 ]

    [ This message was edited by: fu0653 on 06-09-2009 08:46 ]

    domen2
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 12:54

    Maybe you should also try different cards.

    I had write 12x slower than read on an old 16 MB card, but only 2x slower than read on 256 MB card.

    (My setup is not really related - SPI mode, efsl, but the conclusion might be valid)

    afinko
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 12:54

    I successfully implemented

    http://elm-chan.org/fsw/ff/00index_e.html

    system on

    http://www.st.com/mcu/modules.php?name=mcu&file=devicedocsmdt&FAM=110&DEV=STM3210E-EVAL

    on SD card connected through the SDIO port (not SPI). The whole project is attached. I am using KEIL uVision and ULINK2 debugger. The original DEMO code from STM3210E-EVAL board was used, just the sd_FAT(); is called from sd_FAT.c before the menu is started. In this routine the file ''srcfile_aaaaa_bbb.dat'' is opened from SDcard and copied to the file ''dstfile.dat''. The source file is copied in 512 bytes block in RAM and written to the destination file in a cycle, until the whole file is copied.

    The FatFS is ported in diskio.c, reading and writing in supported, the f_mkfs for making file system was not implemented yet (was not required yet, the SD card is much easily formated in any PC).

    In sd_FAT.c are commented the routines for speed tests for reading and writing. I obtained these results:

    1) 128 MB micro SD card that was included with eval board:

    Read 1MB file - 830kB/s

    Write 1MB file - 133kB/s

    2) 4GB micro SDHC card from my mobile phone:

    Read 1MB file - 1MB/s

    Write 1MB file - 325kB/s

    The speeds here are a bit better that I obtained by reading/writing files through the MassStorage USB mode.

    The Stack size was resized from 0x000000400 (that is used in original DEMO code) to the 0x00004000 in startup_stm32f10x_hd.s. Otherwise the HardFault error occur.

    The memory usage can be seen in /List/BOOT_FLASH.map (at the end of file).

    Hope it will help to someone.

    Afi
    ari23
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:54

    Hi Afinko,

    Thanks for this post, I think this helps indeed. I noticed from the source code that you are using the SDIO in 1-bit mode. Wouldn't the performance be improved if you you switch to 4-bit mode instead?

    kakerlakenkoenig
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:55

    Hey Relaxe, could you please attach the files of your Project? This would be very nice!! I cant find your attached file :\

    leszek2
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 12:55

    Sometimes its easier to use less pin numbers of uC. Not everytime you need to achive high speed transfers.

    sascha239955
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:55

    Could you please send your most recent FAT source code. I am playing arround with STM32F103ZE eval board and IAR EW and would realy love trying SDIO with FAT.

    Thanks

    Sascha

    soenke
    Visitor II
    May 17, 2011
    Posted on May 17, 2011 at 12:55

    Hi. I would also like to see the source code.

    Thanks in advance.

    Soenke