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

NAND FAT file system management

Hello experts,

I am developing a C165 based mass storage device and need to implement a FAT file system on flash.

I've read a lot about problems with the life time of NAND due to repeated read/write of the FAT and ST talk about wear levelling software and journeling which are basically jump tables relating vitual addresses to physical addresses to combat the problem.

I know that there are commerical file systems offered by companies and would really like to know if anyone has experience of any of these or selecting NAND for this purpose.

All advice and links greatly appreciated,

Best regards,

Malcom.

Parents
  • Hi Al,

    Thanks for your insight! I didn't relise how old the C165 was as it is the only USB chip that infineon have.

    So I find that the new LPC2148 dev kit comes with a working Mass Storage Device example which is great, wish it had been available 6 months ago, I spent 5 weeks coding that from the specs for C165....

    The LPC2148 has code flash on-board and USB too but has no address bus for external memory. I'm developing a data logger which writes to file every 4 seconds (hence the concerns about Flash life). The ARM (with USB) limits me to serial memory. I need about 4Mb space. Ideally I would use battery backed RAM to avoid the flash wear problem but haven't found it in high enough densitys.

    So if I went the ARM route what would you suggest for 4Mb storage over SPI/SSC/I2C?

    Best regards,

    Malcom

Reply
  • Hi Al,

    Thanks for your insight! I didn't relise how old the C165 was as it is the only USB chip that infineon have.

    So I find that the new LPC2148 dev kit comes with a working Mass Storage Device example which is great, wish it had been available 6 months ago, I spent 5 weeks coding that from the specs for C165....

    The LPC2148 has code flash on-board and USB too but has no address bus for external memory. I'm developing a data logger which writes to file every 4 seconds (hence the concerns about Flash life). The ARM (with USB) limits me to serial memory. I need about 4Mb space. Ideally I would use battery backed RAM to avoid the flash wear problem but haven't found it in high enough densitys.

    So if I went the ARM route what would you suggest for 4Mb storage over SPI/SSC/I2C?

    Best regards,

    Malcom

Children
  • Malcom;
    I'm not qualified to suggest a solution to your problem, but I do have some thoughts. I was not aware of the Keil LPC2148 Eval Board until your post. I downloaded the schematics and noted the board uses an SPI interface for a Compact Disk card. Will this be fast enough for your application? I also note that newer gigbit Compact Flash cards are downright cheap. What I don't know is their page organization. What is the minimum erase/write page size? With a large device size and small page size, you could erase/ write different pages each time rather than grinding a few pages to failure.
    I once worked with a SiLabs device that recored 16 bytes once a minute. By cycling though the entire device, the estimated failure from their specs was 57 years.
    You mentioned that you write every 4 seconds and that you needed 4Mb(bytes?). Does this mean you are writing the full 4Mbytes each 4 sec cycle?
    I have a friend that recently had a similar problem with a data logger project. Best that I remember, he went with battery back RAM of some type. The interface was SPI or I2C because the large memory requirements required a hughmongous parallel bus and his project had limited PC board space. I will review with him and send any info that he might suggest.
    Bradford

  • Hello again,

    Thanks again for your thoughts. My logger files are about 900Kb and I will need to write several files each day. The 4Mb requirement comes from needing several days worth of files stored.

    I've got 2 options:-

    1. Use on-board SRAM (approx 40Kb) to buffer data which can then be written to flash in chunks.

    2. Use battery backed SRAM. Which I've looked for but failed to find in large (~4Mb) densitys using serial protocals.

    Would be very grateful if your friend could recommend a large serial SRAM. Think this would be the best solution.

    Best regards,

    Malcom

  • The LPC2148 has code flash on-board and USB too but has no address bus for external memory
    There are plenty of LPC21xx devices with external memory interface.

    Erik

  • That is true but none with USB too.

    Thanks,

    Malcom

  • Malcom,
    Have you tried "hammering on Philips' door"?

    The 2148 is so new that it is not even listed in the LPC device table, maybe there is another device, not in the table, that is what you want/need.

    I would hunt up an actual FAE, not a "first line responder" and ask "if and if not, when"

    Erik

  • Malcom;
    Once again I was in error. My friend had the same problems trying to locate a large serial SRAM. He uses the Maxim-IC DS1270W as an on chip battery backed SRAM. It has parallel access.
    For his 12Mbyte Flash, he uses the SST25LF080 4 wire SPI device. It is an 8Mbit device arranged as 1Mbyte x 8. He plans to use the SSTVL160 device as 2Mbyte x 8. It has the same footprint but was not available for his prototype.
    Both types have small page size so erasures are reduced.
    His datalogging device is a slave to a larger system. For rapid access, he saves data in the SRAM. If not accessed in X time he then writes to Flash for long time storage. Once again he writes smaller blocks to sequential pages as a circular que. He erases only when he needs to overwrite an old block of data.

  • Hello again Al,

    Thanks for the info.

    I've found a 16Mb SPI flash and will do exactley the same thing.

    Cheers,

    Malcom