File system on SPI flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File system on SPI flash

14,712 Views
admin
Specialist II

I am using MCF52259 microcontroller and MQX RTOS. I want to implement file system on SPI flash. Is it possible to implement MFS on SPI flash? Any sample code available?

 

 

Labels (1)
Tags (1)
0 Kudos
Reply
10 Replies

2,922 Views
Fermi_desarroll
Contributor I

I have the same idea, and so in MQX is really simple to do, that I only am with a problem with the software of the SPI of the example QSPI.C that comes with MQX 3,30, I cannot do it that to compile without errors, you have one demo of the QSPI for M52259DEMO that this correctly compiled. thanks.

 

my English is very bad, for that reason I help with a translator Web, sorry. 

0 Kudos
Reply

2,922 Views
PetrM
Senior Contributor I

All MQX examples should be compilable.

Unfortunately we don't support QSPI for m52259demo, in fact, we don't support QSPI in future releases anymore. You wouldn't be able to do file system with it anyway.

So I propose to get MQX 3.4 and use generalized SPI driver included.

 

0 Kudos
Reply

2,922 Views
MQXuser
Contributor III

Would QSPI still be supported for m52259evb?

You mentined MQX 3.4, where can we find that release? and what do you mean by the generalized SPI driver included? What would be the differences with the not generalized driver?

I've also heard that there might be an example of MFS over an spi memory with the TWR-MEM board. Should we forget about this possibility?

0 Kudos
Reply

2,922 Views
JuroV
NXP Employee
NXP Employee
QSPI driver will be removed and QSPI peripheral will be supported in generic SPI driver (MQX 3.4+). MQX 3.4 will be released in short time (days).
0 Kudos
Reply

2,922 Views
PetrM
Senior Contributor I

Hello,

 

in next release, there will be added MFS SD card support via SPI.

Maybe in future we will add also direct support for SPI flash/eeprom.

Anyway, you can take it like inspiration, it will be quite similar.

 

Regards,

PetrM

 

0 Kudos
Reply

2,922 Views
Jetoleg
Contributor II

Hi,

I wonder if  there any plans for releasing Serial FLASH driver with file system support in MQX?

Unfortunately SD card driver requires a lot of rework in order to make it compatible with bulk serial flash devices like Atmel AT45 series. Could you let me know if anything close to be released by MQX team  to support file system on serial flash?

0 Kudos
Reply

2,922 Views
PetrM
Senior Contributor I

Hello,

 

there is currently no plan to introduce spi flash filesystem support.

But it's not so hard though. You have to:

  • introduce flash_spi subdirectory based on sdcard_spi
  • rewrite there init, read, write functions (you won't need the crc and communicate function - just have to format and read/write packets to spi flash)
  • install the sdcard driver as shown in mfs_sdcard example with _bsp_sdcard0_init structure holding pointers to your init/read/write functions.

The only problem is memory block erase, for which you have to introduce buffer of the same size for temporary storage.

 

PetrM

0 Kudos
Reply

2,922 Views
accutime
Contributor III

Hello Freescale

 

I really do not understand the relationship between Freescale and MQX . MQX needs work in several  small areas to ensure an easy and quick integration from product conception to production using Freescale processors.

 

In order for the engineering world to quickly design in Freescale product we need proactive responses from Freescale rather than comments like "its easy" - "this is how you do it" - "now get on with it". Surely it would be easier to document the solution.

 

No one wants to design SD Cards into embedded systems because of the mechanical problems but an SPI Flash systems is a real fundamental requirement.

 

Is there any documentation detailing MQX problems in what is not functioning correctly today , what is being worked on in terms of fixes and dates on next releases ?

 

Regards

 

Paul H

0 Kudos
Reply

2,922 Views
PetrL
NXP Employee
NXP Employee

Hi Paul,

 

I will try to answer your questions.

 

1) MQX - Freescale relationship is clear. We want to provide good quality and feature rich software support for our products.

 

2) I agree with you, that pro-activity is important. We are trying to that by using sticky topics in this forum and better documenting of our example code. On other hand this forum is intended to be place where people can ask if they get stuck with their development. You never avoid the answers "this is how to do it"...

 

3) SPI Flash file system

- The Embedded Access company offers support for NAND/NOR flash devices. See http://www.embedded-access.com/products/ffs_flash_file.html 

- The Freescale MQX does not provide direct/free solution for NAND/NOR FS. Using MFS on the NOR flash is technically possible, but not recommended (MFS is FAT12/16/32 implementation, not employing any wear leveling mechanisms). 

 

4) The  MQX problems documentation can be found in MQX release notes, section Known Issues. The list of solved bugs is in same document - chapter Change Log. We are not hiding any high prio issues/bugs we are aware of.

The MQX release cycle is quite short (2-4 months), we are trying to address the problems using TIC and this forum between releases. We are going to add sticky topic, where found bugs could be listed.

 

Regards,

 

PetrL

 

0 Kudos
Reply

2,922 Views
BryGuyH
Contributor IV

This an old thread but still present on the front page so I would echo what has been previously mentioned that given today's applications it would greatly aid the ecosystem if a flash file system (and ftl) were available to the public with somewhat more ease than currently exists.

 

Embedded Access was cited as having a FFS and FTL available. When you purchase the FFS/FTL from Embedded Access you receive an non-integrated copy of the HCC Embedded FFS & FTL with no drivers. It took me 2 weeks to fully integrate the package received into the MQX system having already had a significant amount of experiance with the HCC products on a previous project (and consequently already having my flash driver written). The reason we chose to purchase the Embedded Access FFS/FTL (besides the fact we could not carry over the license on our existing HCC sources) was due to the frustration with the HCC product (there are a number of issues, from raw performance to pure low level data corruption).

 

For some reason HCC seems to be the recommendation from a number of vendors (including Micron) and yet you still have to perform a significant amount of integration, testing, and bug fixing on your own.

 

The major players (and most expensive ones) do have FFS/FTLs available (VxWorks, Green Hills, etc), as well as the linux variants (android, eCos, etc) with JFFS2, YAFFS2, and UBIFS. As ubiquitous as micron and samsung flash is these days it would be nice to see a quality FFS/FTL available for use with MQX - as the linux variants are under GPL the available "solutions" for those of us that are stuck between VxWork/GreenHills class products and the GPL are somewhat lacking in their integration, performance, and reliability.

0 Kudos
Reply