We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
Am I going mad? I have the RealView-MDK ARM dev system with the RTOS and TCP/IP package. Included in that is a FAT implementation for Flash devices.
I have an SPI DataFlash (AT45DB321D) which is working fine. Read/Write/Erase etc all tested and functioning.
I now want to use the FAT Filesystem on the dataflash device. However after poking through all the FAT code, it appears it will only work on MMC/SD devices? Or am I missing something?
Any advice would be appreciated.
Thanks
Chris
As far as I can tell you are going mad:
http://www.keil.com/arm/rl-arm/rl-flash_specs.asp
Thinking about it from an inplementor's point of view I'd be able to provide code that communicates with a generic SD/MMC device but not for an unknown chip with unknown interface. I'd therefore guess that you would need to provide functions to read/write/erase etc yourself, and you've been looking at the part of the code that talks to known devices. Somewhere it'll probably make calls to user defined functions.
Hi Jack,
I have implemented the routines, spi_init(), spi_send() etc. I have also put the routines in FS_SPI_FlashPrg.c into the project.
Also enabled the SPI Flash Drive in File_Config.c and set it to default drive.
Weird thing is,
If I call fformat("") it returns with no errors, I can see it go into the correct fs_spi_EraseSector function erase the flash and return. It makes no attempt to put any file system on the flash.
fcheck() fails.
I tried fat_format( "" ) as well. None of them ever attempt to write data of any sort?
fopen fails as there is no filesystem, I would assume.
Also in File_Config.h there is a #ifdef block which fills the FAT functions with null functions (right at the end), if the Memory Card Device support is not included. I don't have a memory card, but I do want to use FAT...What gives?
I'm sorry, but I just don't know. I'd need the code and documentation in front of me to make any more guesses. If it's annoying you now drop Keil a line - I'll bet it's something small that will only be obvious with hindsight!
Did you implement the fs_spi_ProgramPage() function and the FS_SPI_FlashDev.h header?
www.keil.com/.../rlarm_fs_cfgspiflash.htm
www.keil.com/.../rlarm_fs_spicfgprogf.htm
www.keil.com/.../rlarm_fs_spi_flashprg_c.htm