Skip to main content
con3
Senior
November 21, 2017
Solved

STM32CUBEMX FATFS Broken?

  • November 21, 2017
  • 2 replies
  • 1812 views
Posted on November 21, 2017 at 19:38

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.
    Best answer by Tesla DeLorean
    Posted on November 21, 2017 at 21:35

    You're looking at errors at the top level where all detail has been lost, ie FATFS reports a 'Not Working' error.

    In the FATFS model the block storage device being used is being mediated through the DISKIO.C file (or equivalent) providing the read/write functionality to the file system. To debug underlying failures of the layers below you should instrument the calls here. ie Report what you're reading/writing, and the errors/status of those operations.

    Forum traffic suggests there have been significant issues with the code for the MMC/SDIO layer.

    2 replies

    Tesla DeLorean
    Guru
    November 21, 2017
    Posted on November 21, 2017 at 20:19

    There are a lot of reports of issues, but it is not FATFS that is the problem, it simply passes status/failure from the subsystem below. You should instrument the SDIO access routines at the diskio.c interface to them.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    con3
    con3Author
    Senior
    November 21, 2017
    Posted on November 21, 2017 at 20:47

    Evening Clive,

    Firstly thank you for the quick reply.

    I wanted to know if you could please expand on this:

    You should instrument the SDIO access routines at the diskio.c interface to them

    I'm not entirely sure what you mean? Should I initialize the system using LL code?

    Regards,

    Piet

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    November 21, 2017
    Posted on November 21, 2017 at 21:35

    You're looking at errors at the top level where all detail has been lost, ie FATFS reports a 'Not Working' error.

    In the FATFS model the block storage device being used is being mediated through the DISKIO.C file (or equivalent) providing the read/write functionality to the file system. To debug underlying failures of the layers below you should instrument the calls here. ie Report what you're reading/writing, and the errors/status of those operations.

    Forum traffic suggests there have been significant issues with the code for the MMC/SDIO layer.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Stefan M�ller
    Associate II
    November 23, 2017
    Posted on November 23, 2017 at 11:37

    Hi,

    watch out here:

    https://community.st.com/0D50X00009XkX6HSAV

    Best regards

    Stefan

    con3
    con3Author
    Senior
    November 23, 2017
    Posted on November 23, 2017 at 16:05

    Good day Stefan,

    Thank you for the input. i did the change, although I did not get any closure as it still fails. I completely missed the fact that it didn't initialize! thanks for pointing that out.