Skip to main content
egywell
Associate II
March 6, 2017
Question

stm32f746disc sdmmc with fatfs make problem while read or open file in 4 bit mode

  • March 6, 2017
  • 2 replies
  • 799 views
Posted on March 06, 2017 at 04:26

I use fatfs to read text file line by line every time 

when i use normal sdmcc driver which initialize sd wide mode to 4 B  i got fault errors randomly and fatfs hang or stuck at hal sd_getscr function

so i have to change driver setting to 1B mode

I searched too much but couldnot find the problem solution 

    This topic has been closed for replies.

    2 replies

    Nemui Trinomius
    Associate II
    March 6, 2017
    Posted on March 06, 2017 at 08:35

    Dear elbeshlawy.mohammed,

    Try to reduce SDMMC clock(down to below 12MHz),use FIFO Polling instead of DMA and insert series resistor on SDMMC_CK line(nearby MCU side).

    egywell
    egywellAuthor
    Associate II
    March 6, 2017
    Posted on March 06, 2017 at 11:44

    Thanks for reply

    I enabled hardware flow control then problem solved with 4 bit mode 

    Is that enough or still I have to do what you advised ?

    Bob Feretich
    Visitor II
    June 20, 2018
    Posted on June 20, 2018 at 07:37

    If reducing the clock to 16 MHz fixed the problem, then...

    Verify that STM32F7 I/O compensation was turned on.

    Verify that all the SDIO interface pins were set to 'fast' (50 MHz) edge speeds. They default to 2MHz.