Skip to main content
vinicius_acvasconcelos
Associate III
January 29, 2009
Question

FAT system and SD Card, ARM STM32F103RBT

  • January 29, 2009
  • 13 replies
  • 2103 views
Posted on January 29, 2009 at 16:14

FAT system and SD Card, ARM STM32F103RBT

    This topic has been closed for replies.

    13 replies

    vinicius_acvasconcelos
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    Hello,

    I`m using ARM STM32F103RBT6. I`m able to record and read data in SD Card with a raw format(Using simple SPI).

    But I have to use the FAT system because after recorded the card will be read on a PC.

    Anyone have any library, documentation or example using FAT to help me?

    Thanks,

    Vinícius

    mdeneen
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    Check this thread:

    http://www.st.com/mcu/forums-cat-6318-23.html&start=10

    It works quite well!

    vinicius_acvasconcelos
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    Quote:

    On 13-01-2009 at 09:22, Anonymous wrote:

    I've post working example hire:

    http://www.st.com/mcu/forums-cat-7702-23.html&start=10

    Thanks for the example:-D. I tried your exemple, but the CrossStudio give a message:

    'printf.c:(.text+0x30): undefined reference to `__putchar'

    Its the only problem, all the rest seems to work pretty well.

    Could you have any idea how can I solve this problem?

    vinicius_acvasconcelos
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    Quote:

    On 12-01-2009 at 20:40, Anonymous wrote:

    Check this thread:

    http://www.st.com/mcu/forums-cat-6318-23.html&start=10

    It works quite well!

    I tried your Code :-[ . First I had to change all ''SPI_FLAG_TXE'' to ''SPI_I2S_FLAG_TXE''

    After that I was able to compile the code.

    But Didn't Work, I start the debug and the CrossStudio tell: Error reading Memory.

    Someone has any idea to make this code works?Has it?

    [ This message was edited by: vinicius_acvasconcelos on 14-01-2009 19:32 ]

    [ This message was edited by: vinicius_acvasconcelos on 14-01-2009 19:34 ]

    jaroslaw2
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    I've post working example hire:

    http://www.st.com/mcu/forums-cat-7702-23.html&start=10

    vinicius_acvasconcelos
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    Quote:

    On 15-01-2009 at 23:21, Anonymous wrote:

    Read this:

    http://www.rowley.co.uk/documentation/arm_1_7/hcc_customizing_putchar.htm

    [ This message was edited by: slawcus on 15-01-2009 23:21 ]

    Thanks!:-D Its solve the putchar problem, now I'm can compile the code. Today I will test with the Sd Card, and will see if the code realy works.

    slawcus
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    Read this:

    http://www.rowley.co.uk/documentation/arm_1_7/hcc_customizing_putchar.htm

    [ This message was edited by: slawcus on 15-01-2009 23:21 ]

    gabrielbonato
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    I'm problem, not function fat file system examples.

    Please help!

    :(

    vinicius_acvasconcelos
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    Quote:

    On 13-01-2009 at 09:22, Anonymous wrote:

    I've post working example hire:

    http://www.st.com/mcu/forums-cat-7702-23.html&start=10

    I Fixed the __Putchar problem, but your code give a HardwareFault Excepition. What I have to do to this write the data on SD Card in Fat System??? :o

    gabrielbonato
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 12:58

    I'm using msd library st (UM435 - STM3210B-EVAL demonstration software), to adapt for spi2.

    it does not function.

    I'm problem .

    function MSD_ReadByte() not response.

    /* Check if response is got or a timeout is happen */

    while ((MSD_ReadByte() != Response) && Count)

    {

    Count--;

    }

    if (Count == 0) /// count = 0 not response

    {

    /* After time out */

    return MSD_RESPONSE_FAILURE; //always

    }

    else

    {

    /* Right response got */

    return MSD_RESPONSE_NO_ERROR;

    }