Skip to main content
Visitor II
January 15, 2021
Question

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

  • January 15, 2021
  • 3 replies
  • 1596 views

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

    This topic has been closed for replies.

    3 replies

    Graduate II
    January 15, 2021

    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.

    AJeth.2Author
    Visitor II
    January 15, 2021

    Thank you for your answer

    Graduate II
    January 15, 2021

    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

    AJeth.2Author
    Visitor II
    January 15, 2021

    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.​