cancel
Showing results for 
Search instead for 
Did you mean: 

STM3210C_eval evaluation board use Fatfs- f_getfree() functino

robbie
Associate II
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.
2 REPLIES 2
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 Venmo
Up vote any posts that you find helpful, it shows what's working..
robbie
Associate II
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.