I have interfaced 256Mb sdcard with stm32f051 using FATFS driver, find_volume() function is giving FR_NO_FILESYSTEM response because ld_word(fs->win + BS_55AA) != 0xAA55. Please give me some solution for this issue.
Your description does not allow to provide a closer reply.
My statement refers to MDK 5.28a, which today is our latest release.
The Pack Installer of MDK offers for many ST devices demonstrating FileSystem example projects (i.e."File System Demo" for STM32F4):
http://www2.keil.com/mdk5/packinstaller/
Compare with one of these projects your implementation.
See also our "File System Component Documentation" at:
https://www.keil.com/pack/doc/mw/FileSystem/html/index.html
Note - File System access as part of the MDK-Middleware requires either MDK-Pro or MDK-Plus:
http://www2.keil.com/mdk5/middleware
http://www2.keil.com/mdk5/selector
Vandana123 said:using FATFS
Note that FatFs is 3rd-party software - nothing to do with Keil or ARM:
http://elm-chan.org/fsw/ff/00index_e.html
In particular, note the 'Resources' links at the bottom of the page.
Vandana123 said:function is giving FR_NO_FILESYSTEM response
So is there actually a File System on your card?
Vandana123 said:256Mb sdcard
Really? That must be a very old card! Are you sure it's still working?
Vandana123 said:Please give me some solution
What debugging have you done to find the problem?
How To Debug
Would assume you are interfacing via SPI.
Is the diskio read function failing? What data is being read? Is the card formatted and readable in a PC?
The 256 MB card, as Andrew points out, is very old. Some of the recent ST drivers likely don't support the old MMC command set, but rather those for the SD, and SDHC/XC ones.
I seem to recall the old cards needing a couple of CMD55 during initialization.
Yes, i am interfacing via SPI, check_fs() function is failing. The card is formatted and it is readable in PC.
Yes, it is failing because the routines underneath aren't supplying the right data.
Review/dump the data being read from the media, make sure they are actually an MBR or BPB sector the file system can use.
I'd recommend dumping the data from the read function in the DISKIO layer.