Coder Social home page Coder Social logo

Comments (4)

earlephilhower avatar earlephilhower commented on June 12, 2024

Unfortunately I only have 2MB boards (genuine Picos) to work with so can't reproduce your specific issue. In general on the Picos it's just fire-and-forget. Pick a 1MB FS and run and things "just work." You could shrink to a 1MB FS, for testing, and see if there's some other limit I've missed. (I developed the FTL on 32-bit host systems with internal structures set up to support up to 16MB of flash, and it's gone through a bunch of FIO and valgrind testing, but maybe there's something onboard that's not captured that way).

I do/did host testing of the SPIFTL at 16MB (the max addressable flash size) but there may be some onboard issues at large spaces. What you can do is simply tell FAT to not use the FTL and run 4K raw sectors. You'll not get wear leveling, but there's a simple 1:1 mapping and no memory/performance overhead. See the docs for the config options, like so:

...
FatFSConfig c3;
c3.setUseFTL(false); // Directly access flash memory
FatFS.setConfig(c3);
//FatFS.format(); // Format using these settings, erasing everything
... start FatFS and FatFSUSB ...

from arduino-pico.

zjwhitehead avatar zjwhitehead commented on June 12, 2024

Thanks!
It looks like the sketch works on my Adafruit RP2040 Feather (8MB flash) so I'll do some more troubleshooting when I can.
Eventually I get the sparkfun rp2040 working but Im wondering if it takes a long time to boot because calling FatFS.format() is really slow

from arduino-pico.

earlephilhower avatar earlephilhower commented on June 12, 2024

Ah, thanks for the update. There are some linear scans (to same RAM) which will take 8x as long on an 8MB FS as on a 1MB one so there may be some start-up latency, but it shouldn't hang, In any case, would you be able to try the non-FTL option above on the 16MB device and see if that succeeds? W/o an FTL the 16MB device should perform as fast as a 1MB one (but w/o any wear leveling).

One other thing could be the FatFS formatting. Maybe the larger FAT tables blow something up. In that case, the 4K sector size would reduce the # of sectors by 8x and hence do the FAT format faster...

from arduino-pico.

earlephilhower avatar earlephilhower commented on June 12, 2024

I just got a clone board from AX with 16MB of FLASH and was able to try both 8MB and 15MB filesystems. Using the example I was able to get both running without incident. The initial formatting was something like ~1.5 seconds/MB of FS and the restart time was ~ 0.5s/MB (i.e. the 15MB FS took ~20 seconds to do the initial formatting, but after that from the time I hit reset to the time it dumped the list was ~7 seconds).

from arduino-pico.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.