Although not on an STM32, I have also used that and found it extremely easy just to modify the SPI ''driver'' as required.
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
I am using http://elm-chan.org/fsw/ff/00index_e.html to do MMC card access. The portion of the code which does the SPI interface is tiny -- you can modify it to use the latest std peripheral library easily. I pretty much threw away the diskio.c file -- I don't need the layer supporting USB and ATA devices. There are also FatFs sample projects there, including a STM32 example. It supports SD as well as SDHC.
Thanks for your responses! I wonder if you wrote your own set of low level routines or if you used the example pointed to in the references that was written by Martin Thomas? The generic download just provides prototypes for the low level I/O routines, which is appropriate considering the code is intended to be platform independent. Thanks again! Tom Alldread
''I wonder if you wrote your own set of low level routines''
Yes - based on the ones available on that site. There's a whole section on there about the SPI mode on SD Cards - well worth a read. I'm sure it was just a matter of providing spi_read, spi_write type functions - and one to do the clocks without data...
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Thanks for the reference! I now have changed the pin assignments to match my board and have the header file includes updated so that my project will compile the FatFs routines now without LFN specified. I tried to compile for LongFileName(LFN) mode and found it called for UniCode case shift routines ff_convert() and ff_wtoupper(). I have never been down the UniCode path before. I have searched around a bit and have not been able to find boiler code for these Unicode routines. I wonder if you specified LFN compatibility for your project and if so what you used for the uc conversion routines? TIA!
Thanks for the link and most of all for the licensing trap warning! I think I could easily make those routines work for a single code page but for my application LFN is just a ''nice-to-have''. Since I want to keep my application free of proprietary code I will steer clear of LFN. Thanks again!