Skip to main content
robbie
Associate II
December 31, 2015
Question

STM3210C_eval evaluation board use Fatfs- f_getfree() functino

  • December 31, 2015
  • 2 replies
  • 539 views
Posted on December 31, 2015 at 05:16

Hi guys,

I used AC6 system workbench to development STM3210C_eval evaluation board.

Now I try to use Fatfs to get SD card Capacity->res = f_getfree(''0:/'', &fre_clust, &fs);

In debug mode, I get:

Name : res

Details:FR_DISK_ERR

Default:FR_DISK_ERR

Decimal:1

Hex:0x1

Binary:1

Octal:01 

what's happened? Does someone can help me?

Thank all.
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    December 31, 2015
    Posted on December 31, 2015 at 05:25

    Ok, and you've mounted the media? Any of the other access functions work? ie can you open and read a file?

    Have you tested your SD access functions outside of diskio.c? Can you instrument the routines in diskio.c to see which are succeeding, and which are failing?

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    robbie
    robbieAuthor
    Associate II
    January 6, 2016
    Posted on January 06, 2016 at 11:00

    Thanks for your reply.

    I fix it off. 

    Before use Fatfs Functions, it should f_mount() first.