Shop OBEX P1 Docs P2 Docs Learn Events
Updated Full File System Driver — Parallax Forums

Updated Full File System Driver

KyeKye Posts: 2,200
edited 2011-12-30 10:01 in Propeller 1
Hey everybody,

I've updated my Full File System Diver to version 2.0.

No major features have been added or anything. I just made some minor bug fixes.

Here's what they are:

"flushData" now saves meta data information about the file too. Before it did not, which meant that even if your data was saved on the SD card, the file meta data (like the size of the file) would not be correct until the file was closed. This problem is now fixed.

"unmountPartition" now waits for the last write to finish before returning.

Calls to any function in the driver will now no longer possibly hang if the block driver was not started previously.

Calls to any function in the driver will now no longer possibly access an unchecked out lock if the block driver was not started previously.

...

The driver update will be pushed to the Parallax Semiconductor website soon. If I don't hear of any new problems I'll go ahead and update the OBEX also.

Thanks,

And yes, the driver got slightly larger =(.

Comments

  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-25 16:11
    Sounds great Kye. Your driver is at the heart of a number of projects I've done so thanks++.

    I'm working on higher resolution graphics and because there are more pixels, any movies need faster data throughput. What is the speed (roughly) in kilobytes per second for your driver?
  • MacTuxLinMacTuxLin Posts: 821
    edited 2011-09-25 19:58
    Thanks Kye. Appreciates it, as always.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-09-25 20:30
    Kwabena,

    I'm now using your driver to store test data for Parallax's new altimeter/barometer module (about which more on Monday) via the Spinneret's SD card interface. It has worked flawlessly so far! Thanks for your efforts on an excellent object!

    -Phil
  • KyeKye Posts: 2,200
    edited 2011-09-26 06:34
    Please read the application note Dr_Acula: http://www.parallaxsemiconductor.com/an006.

    Thanks,
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-09-26 06:57
    Thanks Kye. Looks like 241 kilobytes per second. Should be enough - thanks.

    BTW, a very well written app note.
  • BonanzaManBonanzaMan Posts: 17
    edited 2011-12-29 21:38
    Hi - I'm trying to use this SD card driver. I've read the application note and am having difficulties with the changeDirectory method.

    fat0.mountPartition(0)

    fat0.listEntries("W")
    repeat while(entryName := fat0.listEntries("N"))
    term.str(entryName) '<
    DIR1 shows up in the listing and is a valid directory
    term.tx(13)

    fat0.changeDirectory(string("\DIR1")) '<
    DIR1 exists and has files in it

    repeat while(entryName := fat0.listEntries("N"))
    term.str(entryName) '<
    second listing of files remains in the root of the card
    term.tx(13)

    fat0.newDirectory(string("test1"))
    fat0.changeDirectory(string("test1")) '<
    even creating a new directoy doesnt work. it doesnt show up on listings

    fat0.listEntries("W")
    repeat while(entryName := fat0.listEntries("N"))
    term.str(entryName)
    term.tx(13)

    fat0.unmountPartition


    Im sure it is something obvious, I've tried numerous permutations and cant seem to get it to work.

    Thanks!

    Greg
  • KyeKye Posts: 2,200
    edited 2011-12-30 09:05
    Yeah, remember that you need to reset the directory listing function when you change directories. It does not automatically reset for you. This allows you to do all the features that involve opening all files in a directory and such. So, the listing function still thinks you are in the root.
  • BonanzaManBonanzaMan Posts: 17
    edited 2011-12-30 10:01
    Thanks Kye - Yeah, I caught the missing "fat0.listEntries("W")" after the changedirectory with fresh eyes this morning. Thanks for the great object - off and running now.
Sign In or Register to comment.