Forum Rule: Always post complete source code & details to reproduce any issue!
Page 34 of 34 FirstFirst ... 24 32 33 34
Results 826 to 835 of 835

Thread: LittleFS port to Teensy/SPIFlash

  1. #826
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    Yes - two copies - one in prior LFS and one added to the NAND code.

    Not all media uses it : FRAM, RAM, PROGRAM. RAM is a NOP - not sure about FRAM to just write may take less time to just write blank on request, without wasting time to read first. As for Program - that is controlled down level in the called code to ignore erase when not needed - and seems hyper efficient/fast.

    Would be good to have knowledge of all the format requests (not called by formatUnused but LFS itself) for invalidating a cached LFS Used Traverse list since building that list can be time costly. But that gets to be invasive - and some media 'format' isn't in same class to share a common class variable on the low level using the 'static_erase' I found months back. Working through that would be invasive and still not sure if that is a welcome set of changes to get the job done? Perhaps the formatUnused could just have a way to be void on 'those' media and let them fend for themselves? It almost isn't worth it on NAND with FAST format and large media capacity that takes longer to scan numerous files/dirs they can hold. Though they are better served by the early exit blockIsBlank() { exits are single config->read_size verify in each erase block } that doesn't have to read 256MB to see the media is formatted { they check only 2048 for each 131072 erase block - a 64X speedup }

    Question: Is there any other reasonable use case that should be added to test in LFSIntegrity?
    > like writes on an interrupt to a file - that could likely re-enter and probably bad form as the time taken is 'unknown/long'. Better to cache data and write in loop()?
    > and other common interfaces beyond open, write, close, delete, dir, disk space?
    ->> Doesn't do any RANDOM seek writes?

  2. #827
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    @mjs513 ... TD 1.54 b7 came out with OLD LittleFS in place.

    Is the current github.com/Defragster/LFSintegrity up to date for a complete pull to PJRC github.com/PaulStoffregen/LittleFS

    I need to put it back here - the older LFSIntegrity wasn't ideal before ... fixed that and added more.

  3. #828
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    @mjs513 ...

    Made a github.com/PaulStoffregen/LittleFS/pull/8 to update from this fork: github.com/Defragster/LittleFS

  4. #829
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,700
    Quote Originally Posted by defragster View Post
    Ok cool was just looking at this now - so now don't have to. Do have to so some testing with the changes though in MTP and standalone

  5. #830
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    Quote Originally Posted by mjs513 View Post
    Ok cool was just looking at this now - so now don't have to. Do have to so some testing with the changes though in MTP and standalone
    Awesome. Let me know if anything changes - the git.LFSIntegrity should match? We can manage any updates but that helps formatUnused look useful and improves/updates LFSIntegrity.ino.

  6. #831
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    PR prepped to update with latest and LFSIntegrity got pulled into PJRC tree. Copied those files to git.defragster\lfsintegrity so they match now for changes going forward.

  7. #832
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    WOW - 5 weeks since last post ...

    @Paul and @mjs513: QSPI 256MB / 2Mb NAND Flash seems to work!
    >> Paul this is freshly soldered from last package with the DIY T_4.1 bootloader chip (Argh - PCB already pinned soldering a WSON - it works no burns)
    >> Also soldered new 8MB PSRAM to same and it works

    Some LFSIntergrity commands to disk - "B":create big file half the size of Media, "b":Verify and Delete big file
    Code:
    ...
    :: /X_file.txt  QSPI_NAND +++ Add [sz 0 add 6300] @KB/sec 546.78 {94.18}  ++ X   Verify /X_file.txt 6300B  @KB/sec 527.46 
    :: /Y_file.txt  QSPI_NAND +++ Add [sz 0 add 6400] @KB/sec 557.05 {89.71}  ++ Y   Verify /Y_file.txt 6400B  @KB/sec 518.60 
     myfs.formatUnused( 0 ) ...
    
    	 formatUnused :: Done Formatting Low Level in 266725 us.
    
    Start Big write of 130920448 Bytes..... // deleted a lot of dots ....
    Big write /0_bigfile.txt took 47.47 Sec for 130918400 Bytes : file3.size()=130918400
    	Big write KBytes per second 2757.89 
    
    Bytes Used: 134348800, Bytes Total:265289728
    
    Delete with read verify all #bigfile's
    	Verify /0_bigfile.txt bytes 130918400 : ..................................................	GOOD! >>  bytes 130918400
    	Big read&compare KBytes per second 2475.46 
    
     myfs.formatUnused( 0 ) ...
    
    	 formatUnused :: Done Formatting Low Level in 3234789 us.
    And the PSRAM for speed compare:
    Code:
    Start Big write of 4141056 Bytes..................................................
    Big write /0_bigfile.txt took  0.96 Sec for 4139008 Bytes : file3.size()=4139008
    	Big write KBytes per second 4296.76 
    
    Bytes Used: 4220928, Bytes Total:8388608
    
    Delete with read verify all #bigfile's
    	Verify /0_bigfile.txt bytes 4139008 : ..................................................	GOOD! >>  bytes 4139008
    	Big read&compare KBytes per second 2315.14

  8. #833
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,700
    @defragster
    Glad that it worked out of the box. QSPI for that chip was a best guess based on the SPI version and the other QSPI chips.

  9. #834
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    Quote Originally Posted by mjs513 View Post
    @defragster
    Glad that it worked out of the box. QSPI for that chip was a best guess based on the SPI version and the other QSPI chips.
    Me too - you did good , didn't see it had been tested with that (pre-release?) 2Mb variant Paul got so just hooked it up. It has been on my mind to see it run so requested one.

  10. #835
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,699
    Minor edit to LFSIntegrity to HALT on failed myfs.begin() :: github.com/PaulStoffregen/LittleFS/pull/11
    - just got two T_4.1's mixed up and failed to catch the passing NAND and NOR fail notice on QSPI

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •