cancel
Showing results for 
Search instead for 
Did you mean: 

How To Read Chunk Character Using Fat FS, in My file 6 Lakh Character

AJeth.2
Associate II

how to read 600 K(6 Lakh ) and more character at a time using Fat FS Micro SD Card , my File store in SD Card in File more then 6 Lakh Character is there , If any other way to read please help me , thanks in advance

4 REPLIES 4

You break the task into smaller bite size pieces you can manage.

For text files and things with inconsistent sizing you'll need to buffer slightly differently and use thought and skill. The "Read Everything" method is not one that scales well.

T​ry implementing on a PC using fopen, fread, etc it will be easier to work through the logic.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AJeth.2
Associate II

Thank you for your answer

For FatFs you can use f_size to determine a file length, vs fseek,ftell in usual C implementations.

If you have a 32KB buffer, do alternating f_read/f_write to copy the content of one file to another, for example

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AJeth.2
Associate II

Yes i checked the File length using ​ f_size in my file 650000 length, when i am read the file using f_read then hard fault error is there. Buffer data type is BYTE.

​​

I need the whole file character in one buffer,i mean 650000 character.​