2022-09-19 05:22 AM
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 ?
Solved! Go to Solution.
2022-09-23 01:25 AM
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 !
2022-09-19 06:04 AM
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.
Check what is read from the card in these failing conditions vs what was written.
For large cards use EXFAT.
Shouldn't need to use f_mkfs on working cards.
2022-09-19 06:19 AM
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.
2022-09-19 06:28 AM
check_fs function return 3
0:FAT, 1:exFAT, 2:Valid BS but not FAT, 3:Not a BS, 4:Disk error
2022-09-19 06:30 AM
Cards don't run at 5V.
Are connecting to a simple socket, or something with a regulator and level shifters?
The 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.
2022-09-19 06:38 AM
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.
2022-09-19 06:59 AM
>>i passed the SD module power supply from 3.3V to 5V
so : 5V at SDcard ?? all cards you "tried" are dead now.
2022-09-19 07:29 AM
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
2022-09-19 09:58 AM
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.
2022-09-23 01:25 AM
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 !