Accessing NAND FAT volume on BF548


I seems to be unable to access volume created on NAND flash on BF548EZ-Kit.

While my ultimate goal is to access files transferred over USB, I am for simplicity sake, try to simply create and read back file on NAND flash.

I had run NandFormat example to format my NAND memory. I'd run mass_storage_app example, and it works fine. I can copy file into USB volume using windows (as well as rename it, delete, etc)

With file is in the flash, I am trying to access it on Blackfin side. Unfortunately, I am completely unable to get to it.

Here is what I did so far:

I had modified HardDiskAccess example to work with NAND flash instead of hard drive, by replacing, in InitFileSystem.c,


#include <drivers/pid/atapi/adi_atapi.h>



#include <drivers/pid/nand/adi_nand.h>


        { ADI_FSS_CMD_ADD_DRIVER,               (void*)&ADI_ATAPI_Def },


        { ADI_FSS_CMD_ADD_DRIVER,               (void*)&ADI_NAND_Def},

Then, when calling adi_fss_Control with ADI_FSS_CMD_GET_VOLUME_INFO, I get result as

ADI_FSS_RESULT_FAILED, wich is just generic failure and means very little. None of the other functions, like create directory, fopen, etc. work either.

Am I missing something here?

I could not find any example of accessing NAND flash, except through USB (which is not very useful - how often would you want to use BF548 just as a USB flash drive?), is there one that I miss?

Any help would be greatly appreciated.