Skip to main content
koutsopo
Visitor II
January 29, 2016
Question

STM32f746G-disco, SD card, FatFs, f_open returns FR_NO_FILESYSTEM

  • January 29, 2016
  • 1 reply
  • 707 views
Posted on January 29, 2016 at 12:02

Hello,

I have an application which consists of 2 threads. One thread is implementing an http client

and the other writes a file in the sd card. When i run the threads seperately they work fine,

however when I run them at the same time the f_open function returns FR_NO_FILESYSTEM.

It turns out that that is probably caused by the lwIP stack initialization function of the first thread.

I would be glad if anyone had any idea.

Thank you.
    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    August 10, 2018

    Bumping chronically old questions off my feed. @ST Community​ 

    The FatFs and SDMMC code is not thread safe, you really need to serialize access to the resources. Consider having a third thread that performs all the FILE operations and services requests from the others via a state-machine.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..