Forum Rule: Always post complete source code & details to reproduce any issue!
Page 22 of 22 FirstFirst ... 12 20 21 22
Results 526 to 533 of 533

Thread: USBHost_t36 USB Mass Storage Driver Experiments

  1. #526
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,725
    Looks right for FAT32. Fat16 was big enough for MS-DOS as HDD's grew - much more so accounting for var sized clusters with compression factor of 16:1. Even Win95 with FAT32 couldn't fit FAT in single alloc limit of 1MB.

    512B/sec and 4B/fat entry is 128 fat entries per sector

    4,092,416 B in the 7993 sectors of the FAT!

    So read was 0.694 MB/sec ? ... with parsing? { 4MB in 5.9 seconds } - should read faster than that.


    PRIOR NOTE p#613: Yes having just a VolumeName.ino would be nice - like i2c scanner just to show finding the attached devices.

    Then perhaps read/write testing - the @mjs513 speedBench() for ref?

  2. #527
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,765
    Just messed up my sdfat lib as well just for a another data point for you.:
    This is for a SD Card with 2 FAT32 and 1 exfat:
    Code:
    msc # Partition Table
    	part,boot,bgnCHS[3],type,endCHS[3],start,length
    FAT32:	1,80,0x0,0x1,0x10,0xC,0x3,0xE0,0xFF,2048,524288
    FAT32:	2,0,0xC2,0x23,0x20,0xC,0xFE,0xFF,0xFF,526336,16564224
    exFAT:	3,0,0xFE,0xFF,0xFF,0x7,0xFE,0xFF,0xFF,17092608,232642560
    pt_#0:	4,0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0
    
    USB Fat Type: Fat32
    Volume Name: system-boot
    2021-01-01 00:00     128890 bench0.txt
    2021-01-01 00:00     128890 bench1.txt
    2021-01-01 00:00     200000 bench2.txt
    2021-01-01 00:00     200000 bench3.txt
    2021-01-01 00:00     149000 bench4.txt
    2021-01-01 00:00     149000 bench5.txt
    ###FatPartition::freeClusterCount: FT:32 start:2080 todo:516192
        m_sectorsPerCluster:1
        m_clusterSectorMask:0
        m_sectorsPerClusterShift:0
        m_fatType:32
        m_rootDirEntryCount:0
        m_allocSearchStart:1
        m_sectorsPerFat:4033
        m_dataStartSector:10146
        m_fatStartSector:2080
        m_lastCluster:516191
        m_rootDirStart:2
        m_bytesPerSector:512
    FAT16 Partition Total Size:264289280 Used:961024 time us: 2122125
    Try calling getUSBPartitionVolumeLabel
    FAT32:	>> Volume name:(system-boot)
    
    USB Fat Type: Fat32
    Volume Name: NEW VOLUME1
    2021-01-01 00:00     128890 bench0.txt
    2021-01-01 00:00     128890 bench1.txt
    2021-01-01 00:00     200000 bench2.txt
    2021-01-01 00:00     200000 bench3.txt
    2021-01-01 00:00     149000 bench4.txt
    2021-01-01 00:00     149000 bench5.txt
    ###FatPartition::freeClusterCount: FT:32 start:526814 todo:2066434
        m_sectorsPerCluster:8
        m_clusterSectorMask:7
        m_sectorsPerClusterShift:3
        m_fatType:32
        m_rootDirEntryCount:0
        m_allocSearchStart:1
        m_sectorsPerFat:16145
        m_dataStartSector:559104
        m_fatStartSector:526814
        m_lastCluster:2066433
        m_rootDirStart:2
        m_bytesPerSector:512
    FAT16 Partition Total Size:8464105472 Used:983040 time us: 8072750
    Try calling getUSBPartitionVolumeLabel
    FAT32:	>> Volume name:(NEW VOLUME1)
    
    USB Fat Type: ExFat
    Volume Name: New Volume2
    2021-01-27 05:36       429216 CommandStation-EX-Arch-v1-0.pdf
    2020-12-27 14:47      5725283 VSLAM_and_Navigation_System_of_Unmanned_Ground_Vehicle_Based_on_RGB-D_Camera.pdf
    ExFat Partition Total Size:119107747840 Used:7077888 time us: 111003

  3. #528
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,864
    Thanks @mjs513 will probably look more in the morning.

    Today I also hacked up that function some more that printed that data, and used digital Write high/low with pin 0 for the whole duration and pin 1 around each call to the cached read...

    And the capture of data also confirmed it:
    Click image for larger version. 

Name:	screenshot.jpg 
Views:	11 
Size:	38.9 KB 
ID:	23849
    Which shows the two getting free counts for the two FAT partitions.
    A close up of the start of the first one shows that the majority of time it is waiting for the sectors to be read:
    Click image for larger version. 

Name:	screenshot2.jpg 
Views:	6 
Size:	298.9 KB 
ID:	23850

    One of the interesting things with the new Logic 2 software, is you can use things like shift mouse select over a set of data and it will do things like count how many pulses happened in that region, which helps confirm some of the calculated data.

  4. #529
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,725
    Was there a change I missed for improved SD card reading? I have four partitions on mine and it is only giving this:
    Code:
    Initialize SD card...SD card is present.
    
    SD Fat Type: Fat32
    Volume Name: SD1_8GB_AD 
    done...
    Swapped in other simple FAT32 SD and no DIR print??

    Pulled down the Yesterday change to KurtE/MTP_t4/tree/MEM_send_object_large

  5. #530
    Senior Member wwatson's Avatar
    Join Date
    Aug 2017
    Posts
    423
    Quote Originally Posted by KurtE View Post
    Quick note: I am thinking it might make sense to add the VolumeName.ino as an example sketch to maybe MscFS.h project. That way we can all keep track of it?

    Make sense?
    Yes it does. Just trying to figure out which version I should add to UsbMSCFat. I am thinking p#506 as a base sketch, but not sure.

  6. #531
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,725
    Quote Originally Posted by wwatson View Post
    Yes it does. Just trying to figure out which version I should add to UsbMSCFat. I am thinking p#506 as a base sketch, but not sure.
    I'm using p#522 here - just minor tweaks for cleaner output and a KurtE Edit that works between 506 and 507.

  7. #532
    Senior Member wwatson's Avatar
    Join Date
    Aug 2017
    Posts
    423
    @All,

    I added 'volumeName.ino' example from post#522 to the examples in USbMSCFat.

  8. #533
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    8,864
    @wwatson - Sounds great.

    @all as I mentioned over in the MTP thread (https://forum.pjrc.com/threads/43050...l=1#post271721)

    I am playing around with seeing about the SDFat/Fslib working with volumes. So I started hacking up a fsPartition.h file which I have it compiling within my version of the volumeName sketch.

    But still not far enough to make work...

    Mainly now because of the class structures...

    That is:
    for Fat we have: class FatVolume : public FatPartition {
    for ExFat we have: class ExFatVolume : public ExFatPartition {

    but Fs we have: class FsVolume {

    Which knows nothing about partition...
    But let me see if I can hack around it......
    Wonder if @Paul and/or @Bill would mind if the FsVolume::begin took optional parameter for part... WIll try that out.

Posting Permissions

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