This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI based RL-ARM flash-file system problem

Hi everyone,

I implemented a SPI based flash-file system based on the RL-ARM (MDK and RL-ARM versions are 3.20) for the LPC2468 uC.
Unfortunately, the implementation is not working. I was able to trace the problem down to the linking process.
I implemented the required functions as described in the RL-ARM help system:

int fs_spi_Init (void);
int fs_spi_EraseSector(U32 adr);
int fs_spi_ProgramPage (U32 adr, U32 sz, U8 *buf);
int fs_spi_ReadData (U32 adr, U32 sz, U8 *buf);

I also implemented the serial data flash device sector description:

// Define Data-Flash Sector Table:
// Sector Size 64kB, 16 Sectors:
#define SPI_FLASH_DEVICE   \ 
   DSB(0x10000, 0x000000), \ 
   DSB(0x10000, 0x010000), \ 
   DSB(0x10000, 0x020000), \ 
   DSB(0x10000, 0x030000), \ 
   DSB(0x10000, 0x040000), \ 
   DSB(0x10000, 0x050000), \ 
   DSB(0x10000, 0x060000), \ 
   DSB(0x10000, 0x070000), \ 
   DSB(0x10000, 0x080000), \ 
   DSB(0x10000, 0x090000), \ 
   DSB(0x10000, 0x0A0000), \ 
   DSB(0x10000, 0x0B0000), \ 
   DSB(0x10000, 0x0C0000), \ 
   DSB(0x10000, 0x0D0000), \ 
   DSB(0x10000, 0x0E0000), \ 
   DSB(0x10000, 0x0F0000), \ 

// Number of sectors for RTFFS:
#define SF_NSECT    16

When I debug my application I notice that the RL-ARM FS makes calls to fs_spi_EraseSector() but never to fs_spi_ProgramPage(). Instead the FS makes dummy calls to methods that are related to the MMC interface.
I did setup the FS configuration correctly in the File_Config.c.
I also noticed that there is only one example for using the SPI interface in conjunction with the file system. This example is for the AT91SAM7A3. When I try to compile this example, I get an compiler error.
I noticed that some function signatures don't match the FS header file declarations.

Thank you for your help!

-Frank

0