I am a noob to using the frdm-k64f board and am trying to get the uSD card operational. I am using Erich Stygers' PE components (FATFsFileSystem, FATFsMemSDHC, FATFs r0.10c) and used his datalogger application.c, h files to write the data from
the accelerometers to the SD card. debugging the code, it errors out reading the card information. Has anyone been successful using the above components and reading/writing the SD card? I am sure am probably just not setting something up correctly. I have tried it with different SDcards on both K64F boards I have. Any gotchas that would prevent the card from communicating? I have zipped the KDS project if anyone wants to take a look.....
CardInfoRetrieval(DeviceDataPrv, IntFlags, Response); /* Handle the card info retrieval state */
Original Attachment has been moved to: FatFsTest.zip
The newest freedom boards K22F and K64F have a lot of the older beans disabled and replaced with ksdk beans (which still have some bugs in the fsl_dspi bean). Erich's fatfs bean requires the old LDD style beans to work. There is a patch available in the downloads that enable the old beans and then the fatfs bean can work. The patch lets you create a project with pex and without ksdk, where without the patch it requires that ksdk be enabled. I have used the fatfs bean on the K22F but it is probably a similar situation with the K64F.
I had a similar problem yesterday getting fatfs to work on the K22F in this thread How do you use DSPI_DRV_MasterTransferData in the fsl_dspi bean?
As far as I know, erich's fatfs bean is not ported to ksdk yet. I tried to port the bean to ksdk myself but the spi driver in ksdk has bugs. The solution is to enable the LDD style beans and then the fatfs bean will work, drag and drop without any troubles.