cancel
Showing results for 
Search instead for 
Did you mean: 

FatFs impementation _ FR_NO_FILESYSTEM error after f_open

malarab
Senior II

Hello,

I build an application with FatFs Middleware to log data on a uSD card.

I used the same protocol on FatFs_uSD application with wl55 mcu.

f_mkfs and f_mount function return FR_OK.

but f_open return FR_NO_FILESYSTEM 

i tried to change between SDHC and SDSC

i passed the SD module power supply from 3.3V to 5V

i changed min heap and stack sizes

i changed _MAX_SS in ffconh.h

... but always the same problem !

any suggestion please ?

0693W00000SvhPoQAJ.png

1 ACCEPTED SOLUTION

Accepted Solutions
malarab
Senior II

I resolved the problem by modifying spi read ans write functions.

it is working now, but i still have a problem in fatfs application : i can not write two time on the same file !

View solution in original post

10 REPLIES 10

Top level functionality is predicated by operation of lower level block retrieval by DISKIO layer. If that fails at its basic level the file system won't work.

C​heck what is read from the card in these failing conditions vs what was written.

F​or large cards use EXFAT.

Shouldn't need to use f_mkfs on working cards.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
malarab
Senior II

i tried with exfat card, the SD card start heating. i removed it directly. and now i can not detect this card any more with other uSDcard reader.

Yes i was tried with and without f_mkfs

FR_NO_FILESYSTEM is returned from find_volume function.

malarab
Senior II

check_fs function return 3

0:FAT, 1:exFAT, 2:Valid BS but not FAT, 3:Not a BS, 4:Disk error

Cards don't run at 5V.

Are connecting to a simple socket, or something with a regulator and level shifters?

T​he error suggests the data read does not meet expectations of an MBR or BPB structure on the media.

Sounds like you need to focus on the electrical interface, and basic block read and write functionality.

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

SDcard reader is connected to 3.3V of nucleo board

I tried 5V because in some forum they say the problem can be resolved with 5V power supply !

Ok i will check my read write SPI function !

Thank you.

AScha.3
Chief III

>>i passed the SD module power supply from 3.3V to 5V

so : 5V at SDcard ?? all cards you "tried" are dead now.

  1. buy new cards.
  2. use 3V3 at SDcard
  3. leave away the  f_mkfs (dangerous!!!)
  4. open root directory
  5. write file (fopen..)
If you feel a post has answered your question, please click "Accept as Solution".

microSD card still working ... i can read and write on it on PC, camera, phone

They should be a power regulator on microSD card modul

The STM32 runs at around 3V typically.

It can be directly connected to MicroSD sockets, with a couple of pull-up resistors on the Dx and CMD pins.

There are dozens of circuit diagrams for this.

Perhaps pull those for DISCO and EVAL boards, and review. Should be under "CAD Resources"

Something super simple like this being ideal

https://www.waveshare.com/micro-sd-storage-board.htm

Things involving 5V to 3.3V regulators, IO buffers, and Arduino connectivity, a whole lot less so.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
malarab
Senior II

I resolved the problem by modifying spi read ans write functions.

it is working now, but i still have a problem in fatfs application : i can not write two time on the same file !