What is the writing limit on a SD card 8G

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is the writing limit on a SD card 8G

Jump to solution
555 Views
neilporven
Senior Contributor I

Hi everyone,

 

I am using FatFs 0.9b and I would like to know what is its limit?  I have a 8G SD card.

 

Thanks,

Neil

Labels (1)
0 Kudos
1 Solution
355 Views
isaacavila
NXP Employee
NXP Employee

Hello Neil,

Have you tried by using f_getfree API?

Here you can find more information: FatFs - f_getfree

And also, in host_msd_fatfs_bm_frdmk64f example (KSDK 1.3) this API is used to get the available space in the disk:

/* Get free clusters */

returnCode = f_getfree(_T("0:"), &fre_clust, &fs);

USB_PRINTF("%lu KB total disk space.\n\r%lu KB available.\n\r", (((fs->n_fatent - 2) * (fs->csize)) / 2), ((fre_clust * (fs->csize)) / 2));

I hope this can help!

Best Regards,

Isaac

View solution in original post

3 Replies
355 Views
neilporven
Senior Contributor I

Quick Update,

I filled the 8G SD card to max cap.

The only thing that could signal that I reached the end is that in f_lseek or f_open .... etc..... the first parameter FIL internal variables

fptr = fsize.  Is it correct to assume once this condition is reached that the card is full?

Thanks,

Neil

0 Kudos
356 Views
isaacavila
NXP Employee
NXP Employee

Hello Neil,

Have you tried by using f_getfree API?

Here you can find more information: FatFs - f_getfree

And also, in host_msd_fatfs_bm_frdmk64f example (KSDK 1.3) this API is used to get the available space in the disk:

/* Get free clusters */

returnCode = f_getfree(_T("0:"), &fre_clust, &fs);

USB_PRINTF("%lu KB total disk space.\n\r%lu KB available.\n\r", (((fs->n_fatent - 2) * (fs->csize)) / 2), ((fre_clust * (fs->csize)) / 2));

I hope this can help!

Best Regards,

Isaac

355 Views
neilporven
Senior Contributor I

Thanks Isaacavila,

The f_getfree is what I was looking for, it helped me.

Neil

0 Kudos