What is the writing limit on a SD card 8G

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

What is the writing limit on a SD card 8G

ソリューションへジャンプ
1,400件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
1 解決策
1,200件の閲覧回数
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

元の投稿で解決策を見る

3 返答(返信)
1,200件の閲覧回数
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 件の賞賛
返信
1,201件の閲覧回数
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

1,200件の閲覧回数
neilporven
Senior Contributor I

Thanks Isaacavila,

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

Neil

0 件の賞賛
返信