Skip to main content
Visitor II
January 1, 2021
Solved

SDIO configuration stm32f429

  • January 1, 2021
  • 3 replies
  • 3324 views

Hello dear engineers,

I have gotten stuck in running SDIO on stm32f429igt6.

No matter how hard I have tried, I wasn't able to successfully use FATFS with SDIO and stm32f429igt6. My code is attached. the f_mount function with immediate force on mounting return fr_no_filesystem. I use SANDISK SD Card with 16GB formatted with FAT32. Any help would be appreciated. Neither KEIL nor CUBEIDE compiler show different behavior.

Furthermore, is it possible to run NTFS on stm32f429?

    This topic has been closed for replies.
    Best answer by Vangelis Fortounas

    hello

    Here is the example code. I added DMA to SDIO and relative paths to FATFS. STACK and HEAP is just big , not studied0693W000006HJwgQAG.jpg

    3 replies

    Visitor II
    January 1, 2021

    Hello.

    Is HSE crystal 25 MhZ? What board are you using?

    .

    January 1, 2021

    Yes, the crystal is 25MHZ. I use a custom board.

    Visitor II
    January 1, 2021

    I ported the code to 32F407VE by changing only the startup file in KEIL MDK (i changed also the device type) Both devices have the same pinout for SDIO)

    The result was as expected. The SD 16GB sandisk, 8k cluster formated, mounted with no error.

    Maybe is a hardware issue, pinouts, bad soldering, etc0693W000006HJRTQA4.jpg 

    January 1, 2021

    @Vangelis Fortounas​ Thank you for your follow up. Would you please check if the USB works simultaneously? I have configured the USB as to be in CDC class in my code, that is if you plug in the USB cable into your board and your PC, you'll see a serial port. If they work simultaneously, then it seems my board has some flaws within.

    Visitor II
    January 1, 2021

    For some reason the CDC device couldn't enumerated with your code .

    I tried with "fresh" produced code from my CubeMX and was OK.

    I suggest to solve the problems one by one with special produced code for every issue. Update all cubes and firmwares and check also the errata sheet for possible limitations.

    January 2, 2021

    Dear @Vangelis Fortounas​ 

    Your help is really really appreciated.

    Now I have some more questions.

    Have you been able to write on the 16GB Sandisk SD card on your stm32?

    I also have been able to mount that, but not able to write on the disk, instead, I have been able to write on a 2GB disk. (I think this is the incomplete part of Chan FATFS library).

    Anyway, another question is why didn't you enable using DMA template on FATFS Middleware part?

    Visitor II
    January 2, 2021

    Hello

    I can read an write to 16GB sandisk sd card. (look at the screenshot). FATFS ver=R0.12C Check the format of SD card or reformat it( usualy this solves most problems)

    As for the DMA, i forgot to enable the dma version of diskio. But works fin if enabled also.

    January 3, 2021

    Dear @Vangelis Fortounas​ 

    Thank you for your kind cooperation. Now I am able to read and write the 16GB SD.

    Thank you very much.