Skip to main content
Explorer
December 5, 2025
Question

how to save data into SD card

  • December 5, 2025
  • 3 replies
  • 142 views

Hi,

I want to save the data in microSD memory card(for e.g. 4GB) as a file using STM32H573 discovery kit. And gone through with internet search and got some information.  But unable to get the exact idea to how to start with or done it. Found one connector CN5 on the board for SD card. In order to get the above said what are the prerequisties need to be done and what need to be selected in IOC file . Can anyone tell a step wise procedure for this or give an example code would be a great help. Thanks in advance.

 

    This topic has been closed for replies.

    3 replies

    ST Employee
    December 5, 2025

    Hello @Rao 

    You can refer to the application available in the STM32CubeH5 package, which demonstrates how to use the microSD card on the STM32H573 Discovery kit. The example uses the FileX middleware and is a complete, ready-to-run project.

    Here is the link to the example: STM32CubeH5 - Fx_uSD_File_Edit

    This project shows how to initialize the SD card, mount the filesystem, and perform file operations such as creating, reading, and writing files on the microSD card connected via the CN5 connector.

    Technical Moderator
    December 5, 2025

    Hello,

    This is an example using FileX (Azure RTOS) that runs on STM32H573-DK board: Fx_uSD_File_Edit 

    Please read the readme.md file on how it works.

    RaoAuthor
    Explorer
    December 8, 2025

    Thanks for immediate reply...

    I have tried the above code. But, while building the code,  got an error like " undefined reference to' MX_SDMMC1_SD_Init' ".  Why this error coming don't know actually...

    Technical Moderator
    December 8, 2025

    Hello,


    @Rao wrote:

    Thanks for immediate reply...

    I have tried the above code. But, while building the code,  got an error like " undefined reference to' MX_SDMMC1_SD_Init' ".  Why this error coming don't know actually...


    This is a new question. So please mark the post that answered your original question. Not this post.
    Open a new thread and clarify how you download the example and what IDE are you using and mention if you changed something in the code.

    Thank you