I am evaluating the Keil File System Middleware. I have encountered a problem. Hopeful someone could give me a quick and clear hint.
It seems there are two types of file systems in the FS middle ware: Embedded FS and FAT FS.
Could someone tell me the differences between this two types.
I have noticed that NOR flash type be configured to use the Embedded FS type.
Could this Embedded FS be compatible with the USB Mass storage Class?(Treated as a plugged U Disk by the PC).
Could NOR Flash be configured to use the FAT FS? I have noticed the open source FAT FS doesn't distinguish the NOR Flash from other storage media.
Could a pure SPI Flash(i.e. Winbond W25Q32) be configured as the NOR Flash? The official Keil Pack includes a special NOR Flash(AT45DB642D) which supported both bus style NOR flash access method and a SPI style.
Thanks.
Thank you Reinhard Keil.
I have investigated the MCI interface, which indeed has a SPI option.
I found that the MCI driver interface is still very different from the SPI Flash I would use. For example, it requests SDIO driver as mandatory. And the MCI Command is not similar to the SPI Flash command.
For now I have to retreat to my previous open source solution.
I strongly advocate that the SPI Flash should be treated as equal as the NAND Flash/MCI(but not NOR Flash, which could not use FAT type FS). The "S:" label device should be recovered from the MDK4 Middleware system.
I am waiting for your update.
How do you intend to put FAT on Winbond W25Q32 device? This device can only erase 4K sectors and this is not compatible with 512B sector size required by FAT. Does your open source solution provide some sort of translation layer?
File System component supports NOR flash devices with NOR or SPI interface (you can take a look at M29W640FB.c and AT45DB642D.c driver implementation) both on drive "F:", but they can only be formatted using Embedded File System.
To my knowledge, most of the storage devices available are not compatible with the FAT requirement of 512Bytes sector size. Most of the stable file system solutions, including the one I am using have a translation layer. I suspect now whether it is the absence of a translation layer that may render the Keil middleware FS unable to use FAT FS type with the NOR/SPI Flash.
The reinvented wheel of Embedded File System could not exist simultaneously with the USB mass-storage class application. It is against with the reason of using a File System or file to facilitate data exchange. Between customized binary record and full-fledged file system, I saw little necessity of the yet another Embedded File System.
There exist AT45DB15(32,64) family of devices with small sectors (512bytes) that can be used with FAT-type file systems directly. As I said, I've modified Keil's RAM disk driver for the purpose and use it with AT45DB16 in several devices. You can do the same. The only modification is required in fs_config.h file. You should use Keil's original file, modify it and save with your project files so copmiler will use it when compiling fs_config.c instead of default one. And of course, you must write serial driver for sector read/write yourself...
Thank you, Dejan Durdenic.
I would not modify my hardware to justify the Keil's twisted middle ware design. My hardware uses a SPI Flash with 4K sector. I have returned to the open source FAT FS I adopted in my previous project. It works fine for me. So far I have not found any inconvenience.
So what is final verdict. Can we use NOR flash with Keil FAT FS or with open source FATfs library?