Shop Learn
P2 SD Drivers - COG PASM Version V2.70 - Page 3 — Parallax Forums

P2 SD Drivers - COG PASM Version V2.70

13»

Comments

  • Cluso99Cluso99 Posts: 17,840

    FWIW I have now posted the FAT32 object over on my new P2 OS thread here
    https://forums.parallax.com/discussion/173395/clusos-propeller-os-v2-38-includes-sd-driver-and-fat32-object-plus-serial-driver

    AFAIK it is now working fine and ready for prime time. I found my problems with not being able to use duplicate copies of FAT32 concurrently.

  • Cluso99Cluso99 Posts: 17,840

    First post updated to include links to my P2 OS and FAT32 drivers using my current SD Driver.

  • @Cluso99 said:
    FAT32 Drivers

    Attached is the first working version of Kye's FAT32 Driver that I converted to run under P2 SPIN2.
    I haven't included all the re-direction objects that make this run, but I thought I would post it here in case anyone was interested.
    Note there is a problem that the code uses the P1 ROM space to write to when skipping bytes. This will need to be fixed.
    I have used this in my P2 OS here
    forums.parallax.com/discussion/171600/propeller-2-os-its-alive

    @Cluso99
    It appears that changing directories does not work as far as listing entries.

    I can successfully change directories to a subfolder, but using listEntries immediately afterwards returns filenames in the root directory, not the subfolder.

  • Cluso99Cluso99 Posts: 17,840

    @wmosscrop said:

    @Cluso99 said:
    FAT32 Drivers

    Attached is the first working version of Kye's FAT32 Driver that I converted to run under P2 SPIN2.
    I haven't included all the re-direction objects that make this run, but I thought I would post it here in case anyone was interested.
    Note there is a problem that the code uses the P1 ROM space to write to when skipping bytes. This will need to be fixed.
    I have used this in my P2 OS here
    forums.parallax.com/discussion/171600/propeller-2-os-its-alive

    @Cluso99
    It appears that changing directories does not work as far as listing entries.

    I can successfully change directories to a subfolder, but using listEntries immediately afterwards returns filenames in the root directory, not the subfolder.

    You may be correct. I have never use directories even on P1 so I guess maybe it's never been tested :(
    I have just done a conversion of Kye's FAT32 driver to spin2. I've added a few things and fixed a couple of things I've needed but I haven't ever bothered to understand his code.
    I'm unsure if the problem is in my listEntries spin code or in Kye's code. I'm busy ATM but will take a look when I get a chance.

  • I seem to have fixed the issue by adding a listingUncache() call within the changeDirectory method...

    ...
    currentWorkingDirectory := readDIRCluster()
    listUncache() ' <=== Added to fix issue with not listing in subdirectory
    unlockFileSystem()

    I suspect this works because the previous (root) directory was already cached and the cache needed to be reset. Or I may be wrong. Wouldn't be the first time.

  • Cluso99Cluso99 Posts: 17,840

    @wmosscrop said:
    I seem to have fixed the issue by adding a listingUncache() call within the changeDirectory method...

    ...
    currentWorkingDirectory := readDIRCluster()
    listUncache() ' <=== Added to fix issue with not listing in subdirectory
    unlockFileSystem()

    I suspect this works because the previous (root) directory was already cached and the cache needed to be reset. Or I may be wrong. Wouldn't be the first time.

    Thankyou. Please let me know when you’re happy with the fix and I’ll add it into my next release.

  • @Cluso99 said:

    @wmosscrop said:
    I seem to have fixed the issue by adding a listingUncache() call within the changeDirectory method...

    ...
    currentWorkingDirectory := readDIRCluster()
    listUncache() ' <=== Added to fix issue with not listing in subdirectory
    unlockFileSystem()

    I suspect this works because the previous (root) directory was already cached and the cache needed to be reset. Or I may be wrong. Wouldn't be the first time.

    Thankyou. Please let me know when you’re happy with the fix and I’ll add it into my next release.

    It works for me, tried several different directories and they all listed correctly. Thanks!

Sign In or Register to comment.