Skip to main content
Graduate
December 4, 2024
Question

Remounting Sd Card

  • December 4, 2024
  • 2 replies
  • 1013 views

I am working with stm32h750xb.  i want to mount and write data at different time interval

i am using fatfs and SDMMC  


If i mount it in main and try to write in loop it is not working it showing error

            so i did both in loop i was able to write and read. but i can do it only once , if i unmount and try to mount again its showing error 

So i want to know how to remount after unmounting 

and also why i am not able to write if i mount in main and write in loop

 

   

    This topic has been closed for replies.

    2 replies

    Super User
    December 4, 2024

    @DeepakY wrote:

    its showing error 


    What is showing error?

    What error(s), exactly, is it showing?

    What debugging have you done to find the reason for the error?

    Give full hardware and software details.

    https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

    DeepakYAuthor
    Graduate
    December 26, 2024

    thank you
    i found the problem i did not giving delay after unmounting 

    i have one more problem

    whenever i turn on stm32 the memory card will not get initialized at beginning i need to press reset 3 to 4 times sometimes it does not get initialized after trying for long period also

    here is the code 

    STATUS stat = RES_OK;

    stat= disk_initialize(0);

    HAL_Delay(500);

    printDriveStatus(stat);

     

    while (f_mount(&SDFatFS, (TCHAR const*)SDPath, 1) != FR_OK)

    {

     

    }