Has anyone got a working example for SD card with SDIO and FreeRTOS on STM32F413 with STM32CubeIDE version 1.6.1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-26 5:29 AM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-14 6:17 AM
Here is an example for all of you that are still stuck with the same problem.
In the example, you can find the project file for STM32CubeIDE and STM32CubeMX.
I'aware of the fact that the code is clumsy but it will give you an idea on how to set some of the parameters for the MCU.
The example works with SDIO 1 bit mode.
Few things to be aware of:
- The code runs on a custom board where pull-up resistors of 10K are placed on the SD card pins :
- The SD card installed is 32GB, I first format the card with the PC and then plug it on the board. The first time f_open() gives an error, I reset the MCU and run the code again and from then on it works well, meaning I can create the file, write some text and read it back. Perhaps the time to set up the disk it too short the first time, I still have to debug it.
- Be aware of the SD card that you are using, I have also been using a 16GB card without success, only to later find out the card was corrupted.
Hope it helps.
Once again, thanks to everybody for the answers, they have been of great help anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-26 6:12 AM
Hello @DFres.1
Have a look at the SDIO library code and the examples within STM32CubeF4 MCU package:
STM32Cube_FW_F4_V1.26.1\Projects\STM32F413H-Discovery\Applications\FatFs
You can follow the guide to import Cube projects from SW4STM32 to STM32CubeIDE:
- UM2579: Migration guide from System Workbench to STM32CubeIDE
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-26 6:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-26 8:35 AM
Even easier ... let's rely on example browsing import and feature ...
Either from welcome page or from File > Import > General > Import STM32Cube Example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-27 12:46 AM
Thank you for your prompt reply, I should have specified better the question.
What I am interested in, is the full project files including also the .ioc extension from CubeMX.
Meaning, the example starting from CubeMX to CubeIDE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-27 12:50 AM
Thank you for your prompt reply Walid,
What I am interested in, is the full project files including also the .ioc extension from CubeMX.
Meaning, the example starting from CubeMX to CubeIDE.
I have however tried your example but without any success. The board I am using is the Nucleo-F413ZH.
I would like to see all the MX configuration if possible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-27 12:52 AM
Thank you for your prompt reply, I should have specified better the question.
What I am interested in, is the full project files including also the .ioc extension from CubeMX.
Meaning, the example starting from CubeMX to CubeIDE.
I would like to see the MX configuration for clock settings and peripherals and then the code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-04-27 1:28 PM
Unfortunately sounds no example supporting configuration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-14 6:17 AM
Here is an example for all of you that are still stuck with the same problem.
In the example, you can find the project file for STM32CubeIDE and STM32CubeMX.
I'aware of the fact that the code is clumsy but it will give you an idea on how to set some of the parameters for the MCU.
The example works with SDIO 1 bit mode.
Few things to be aware of:
- The code runs on a custom board where pull-up resistors of 10K are placed on the SD card pins :
- The SD card installed is 32GB, I first format the card with the PC and then plug it on the board. The first time f_open() gives an error, I reset the MCU and run the code again and from then on it works well, meaning I can create the file, write some text and read it back. Perhaps the time to set up the disk it too short the first time, I still have to debug it.
- Be aware of the SD card that you are using, I have also been using a 16GB card without success, only to later find out the card was corrupted.
Hope it helps.
Once again, thanks to everybody for the answers, they have been of great help anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-05-14 6:31 AM
When you use C (not C++), you can generate the project with CubeMX, after generation is done, press open then the project will be imported to IDE and you can continue with IDE without using MX anmore. You can also import the project in IDE.
