Shop OBEX P1 Docs P2 Docs Learn Events
now mount SD and MMC and SDHC — Parallax Forums

now mount SD and MMC and SDHC

lonesocklonesock Posts: 917
edited 2008-08-28 20:37 in Propeller 1
Hi, All.

I took the awesome sdspifasm.spin as a base, and modified it to use the mounting scheme from elm-chan.org. It can now mount MMC, SD, or SDHC cards. I've tested it on all three types with raw data block access. I can not test the FSRW FAT16 routines on the SDHC, though, since I do not have a card reader which supports the HC version of SD cards and the card did not come formatted as FAT16. Could someone please try it out for me?

I used sdspifasm as a base because it was the fastest version which still had all the mounting logic in SPIN. It will be trivial to port this code to the sdspi.spin and sdspiasm.spin versions, but slightly more tricky to port it to sdspiqasm.spin [noparse][[/noparse]8^)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lonesock
Piranha are people too.

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-08-28 16:16
    Sock,
    are you telling us that, with SDHC, the Prop might be able to utilize SD cards up to (what's the limit?) 32Gbytes? Is this what I'm hearing? roll.gif
  • lonesocklonesock Posts: 917
    edited 2008-08-28 16:47
    ElectricAye said...
    Sock,
    are you telling us that, with SDHC, the Prop might be able to utilize SD cards up to (what's the limit?) 32Gbytes? Is this what I'm hearing? roll.gif

    [noparse][[/noparse]8^) That I am. FAT16 still has the 2GB limit, of course, but for raw access (or multiple partitions), yep. (And if I understand correctly, the 32GB limit is in only the 2.0 spec, not any HW limitation. Well, there are price limitations as well wink.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • rokickirokicki Posts: 1,000
    edited 2008-08-28 17:28
    This is cool! It may be time to investigate FAT32.

    But, silly question, has anyone yet found 2GB to be a limit? I mean, even at 1MB/sec (which the Prop cannot get to right now), that's more than a
    half-hour of continuous reading or writing.

    -tom
  • lonesocklonesock Posts: 917
    edited 2008-08-28 18:12
    rokicki said...
    This is cool! It may be time to investigate FAT32.

    But, silly question, has anyone yet found 2GB to be a limit? I mean, even at 1MB/sec (which the Prop cannot get to right now), that's more than a
    half-hour of continuous reading or writing.

    -tom

    I'm getting raw writes at ~5sec/MB (over about 4 different cards). I hope to improve this by using the multi-block read/write commands, but haven't tried it yet (and it also requires larger buffers on the propeller [noparse][[/noparse]8^(. My application will be recording data at almost max for several multi-hour sessions. But I do admit this is an unusual case. I am planning to have a 1GB FAT16 partition up front, and use the remainder of the SDHC card as raw data storage. The user can "export" a given session to the FAT16 partition for easy recovery on their PC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • simonlsimonl Posts: 866
    edited 2008-08-28 19:53
    @lonesock: Excellent work - I have an up-coming application for this - thank you.

    @tom: Hmmm - FAT32 [noparse][[/noparse]:HUGE-SMILE:]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • heaterheater Posts: 3,370
    edited 2008-08-28 20:36
    This great. Sadly my 8080 emulator and CP/M file system can't use it either confused.gif

    Isn't there a way to read raw data from an SD card, with no file system on it, under Windows. Like the dd command in Unix/Linux. Would be great for big data logging tasks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
  • heaterheater Posts: 3,370
    edited 2008-08-28 20:37
    Actually, there is a dd for Windows here http://uranus.it.swin.edu.au/~jn/linux/rawwrite/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    For me, the past is not over yet.
Sign In or Register to comment.