AnsweredAssumed Answered

FR_NO_FILESYSTEM from FatFS on KwikStik

Question asked by Marcin Kajor on Jul 31, 2015
Latest reply on Apr 13, 2016 by thiagow

I’m trying to run FatFs on KwikStisk borad based on the code from Erich Styger’s component FatFsMemSDHC and Component SDHC_LDD typical usage from CodeWarrior Help tool. I’ve written api functions: disk_initialize, disk_status and disk_read and now I want to call f_mount function from elm-chan library and I get FR_NO_FILESYSTEM status error which comes directly from check_fs method which is called from inside find_volume (he hierarchy of functions: f_mount->find_volime->check_fs). The line which generates the error in check_fs:


if (LD_WORD(&fs->win[BS_55AA]) != 0xAA55) /* Check boot record signature (always placed at offset 510 even if the sector size is >512) */
return 2;

Any other fucntions give no errors. What 'boot record signature' does mean?To debug the application I’ve forced 0x00 in the adress where the value 0xAA55 should be using memset() function before the SDHC1_TransferBlocks is called in:


f_mount->find_volume->check_fs->move_window->disk_read->SD_TransferBlock->SDHC1_TransferBlocks (according to example)


and after SDHC1_TransferBlocks procedure there are still zeros under this adress in RAM. Can I fix it somehow? Is it possible that the SDHC1_TransferBlocks generated by Processor Expert dosn’t read anything from the device despite returning no errors? Could it be related to some hardware or SD card issues? I'm using 400kHz bus clock for the component. Thanks for any help.