FAT memory allocation

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys, I have the FAT32 filing system and also the exFAT.  Both use 2 memory arrays that are the size of the cluster size elected by the User when formatting.

 

Do you think I should try and only us 512 Bytes for processing data in the filing system?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For an AVR with 2k of ram, you want to be frugal. If you have megabytes of ram, then you can afford to keep larger buffers that help performance .

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have 512MBytes of Ram but I think I'll go for working with sectors at 512Bytes

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've lost track - is this supposed to be a universal FAT support library for multiple architectures (like FatFs) or is it simply a single implementation for one architecture. If multiple it needs to scalable. If it's for one architecture then optimse it for the resources available. (no point working a sector at a time if you have 512MB!). If you have loads of RAM then do DMA block transfers of maybe the next 16 or 32 sectors in each read on the basis that most file access is sequential and there's every chance the client will ask for the next sector, then the next and so on anyway! In fact you might as well always DMA a cluster.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seems smart Clawson.  Might go for two architectures, one with limited resources of 512K and one with cluster size allocation.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It almost feels like you are on the wrong forum................

a "limited resources"  processor of 512K...............

Get me an AVR that even comes close even if you talk about bits (64Kbyte) or bit levels(32K bit levels) you will not find a processor that comes close.

I would go and have a look at FatFs and how scaling is done there. Bet they have the min-max recourses needed sorted to make sure they can run on almost every platform thinkable.

would love to have a AVR8 with that amount of RAM, litterally no thinking about how to spend it as I think getting that used up would be a challenge by itself.