Shop OBEX P1 Docs P2 Docs Learn Events
SDLoader/Bootloader Mounting issue (Resolved and updated with video) — Parallax Forums

SDLoader/Bootloader Mounting issue (Resolved and updated with video)

marzec309marzec309 Posts: 146
edited 2010-11-16 20:14 in Propeller 1
I've been trying to use the sdloader object and GG's Bootloader(I believe they are the same program), but my SD card will not mount. I'm leaning towards wrong formatting or maybe incompatible card. I did modify it, so i could see the abort code, which is a -20 "not fat16". I've tried every SD card I have with no success. Does anyone know of an alternate program to format the SD cards? I've tried using XP to format them in every way possible.

Hardware setup:
I'm using a propellor proto board and Hydra SD-MAX Storage card and supplied sd card(1Gb). The sd-max is hard wired via the expansion header to the PPB. Jumpers a roughly 3" max in length.
SD pin connections are:
DO - 0
Clk - 1
DI - 2
CS - 3

I've also tried numerous SD cards including a small 32Mb card the only one to accept a 512 sector size format(w/windows xp).

Comments

  • Nick McClickNick McClick Posts: 1,003
    edited 2010-11-15 12:32
    Can you use the card in other programs, like fsrw's test program?
  • marzec309marzec309 Posts: 146
    edited 2010-11-15 14:48
    Can you use the card in other programs, like fsrw's test program?
    Nope, this has me stumped. I just tried fsrw26 test program

    Mount tests first
    First mount.

    Mount failed spectacularly!
    Command => Response
    Erroneously returned from start!
    -1
  • marzec309marzec309 Posts: 146
    edited 2010-11-15 14:51
    Could this be because my jumpers connecting the adapter to the PPB are too long?
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-11-15 14:57
    I would certainly look at the prop. Long cables could certainly be a problem - how long are they? Do you have pullups?

    I have never had a problem with XP formatting the cards I use in the RamBlade and I have formatted quite a few.
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-11-15 15:08
    I've never had a problem, either - with the default 'format' option in windows, everything works fine.

    The bootloader needs a FAT16 (2GB or less) card, but fsrw can deal with SD or SDHC. Either way, you're using a non-SDHC card.

    3 inch wires should be fine. Are you using pullup resistors? The stuff I've tried usually works without pullups, but if you're having problems, it's a good idea to use them.

    My best guess is maybe you aren't connecting power and ground on the SD card. Is the VDD pad connected to 3.3v & the Gnd pad connected to ground?
  • marzec309marzec309 Posts: 146
    edited 2010-11-15 15:19
    Cluso99 wrote: »
    I would certainly look at the prop. Long cables could certainly be a problem - how long are they? Do you have pullups?

    I have never had a problem with XP formatting the cards I use in the RamBlade and I have formatted quite a few.
    I've never had a problem, either - with the default 'format' option in windows, everything works fine.

    The bootloader needs a FAT16 (2GB or less) card, but fsrw can deal with SD or SDHC. Either way, you're using a non-SDHC card.

    3 inch wires should be fine. Are you using pullup resistors? The stuff I've tried usually works without pullups, but if you're having problems, it's a good idea to use them.

    My best guess is maybe you aren't connecting power and ground on the SD card. Is the VDD pad connected to 3.3v & the Gnd pad connected to ground?




    Yes, I am using pull ups. There are 10k pull ups built into the hydra sd max card(Using the hydra adapter only with a PPB). This adapter also has a power led which is lit. So, the card should have power(vdd 3.3v).
  • marzec309marzec309 Posts: 146
    edited 2010-11-15 15:31
    I should note the cards I do have on hand and testing with are PNY 256Mb, Lexar 1Gb and crucial 1Gb.
  • marzec309marzec309 Posts: 146
    edited 2010-11-15 15:50
    here's some pic's of the connections.
    800 x 600 - 101K
    800 x 600 - 109K
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-11-15 16:47
    Do you have VGA on the board?

    Or - can you put a terminal program on the propeller programmer lines?

    Either way, KyeDOS talks to both and works a lot better with sd cards.
  • marzec309marzec309 Posts: 146
    edited 2010-11-15 16:55
    OK, guys thanks for the help. It might not seem like it but you helped confirm it wasn't a software issue.

    I remembered a past issue I had with this project. My lcd was hanging when I inserted an sd card, well in the end I rewired it so they didn't share I/O's. I now know why my original plan of sharing a couple of pins didn't work. Quote "Assumptions are the cause of all F&^%ups". I assumed the id "J2" marked Pin1 of the sd adapter, not the case.

    IT LIVES :)

    Test Results:

    Clock: 80000000 ClusterSize: 16384 ClusterCount: 60942
    Raw write 3968 kB in 2268 ms at 1749 kB/s
    Raw read 1920 kB in 2184 ms at 879 kB/s
    fsrw pwrite 2016 kB in 2354 ms at 856 kB/s
    fsrw pread 2016 kB in 2297 ms at 877 kB/s
    FSRW pputc 63 kB in 2100 ms at 30 kB/s
    FSRW pgetc 63 kB in 1837 ms at 34 kB/s
    All done!

    Here's the fix.
    800 x 600 - 81K
  • marzec309marzec309 Posts: 146
    edited 2010-11-15 16:57
    Dr_Acula wrote: »
    Do you have VGA on the board?

    Or - can you put a terminal program on the propeller programmer lines?

    Either way, KyeDOS talks to both and works a lot better with sd cards.

    No, I'm not running VGA but instead I'm using a graphics LCD. I will have to check out KyeDOS. Does it support SD Booting?
  • marzec309marzec309 Posts: 146
    edited 2010-11-16 20:14
    here's a video of the working boot-loader.

    http://www.youtube.com/watch?v=K8E_geFsBOo
Sign In or Register to comment.