Spansion Flash File System

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Spansion Flash File System

1,655 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by crudo on Wed Nov 28 14:16:00 MST 2012
I am trying to use the Spansion FFS on LPC1788 chip, but I don't know how to configure the flash chip interface (I/O's or EMC).
I read about FLASH_RW and FLASH_RD macros, but I can't understand how they work. I follow the steps on LLD (Spansion Low Level Driver) documentation, no success. I intent use too the other layers of Spansion FFS: SpansionBD and SpansionFS, if anyone can provide a example I am so grateful.

The functionality that I expect is like this:

/* flash_config.h */
/* Flash configuration defines */

/* main.c */
FLASH_FILE *fp;
flash_init();
fp = flash_fopen("/text.txt", "w");
flash_fwrite(fp, 1, sizeof(buffer), buffer);
flash_fclose(fp);
fp = flash_fopen("/text.txt", "r");
flash_fread(fp, 1, sizeof(buffer), buffer);
flash_fclose(fp);


The flash chip that I am using is S29Gl064N90TFI04 (NOR).

Best Regards,
Ricardo Crudo.
标签 (1)
0 项奖励
回复
1 回复

1,467 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by crudo on Thu Nov 29 04:54:03 MST 2012
I have contacted the spansion support and response is that the LLD don't do the interface with the I/O's or EMC. I post below the Zhi response, just to register.

"""
Your questions are mainly about how to set up the system Flash interface to access to the NOR Flash. I think you can get a better idea by reading the LPC1788 datasheet or the board setup documents that are associated with your particular board. You won't find this kind of information in LLD.

The LLD is just a low level driver software which you can use it to read from and write to the Flash. You should first set up the system correctly before using the LLD functions. For example, you need to set up the Flash base address to the chip select you use for the Flash. You need to tell the CPU what the size of the Flash is for that chip select.

Once the Flash interface is set up, you can just use FLASH_RD or FLASH_WR to access the Flash.

...

Best regards,
Zhi
"""

Best Regards,
Ricardo Crudo.
0 项奖励
回复