Shop OBEX P1 Docs P2 Docs Learn Events
SDcard fsrw26 err -1000 — Parallax Forums

SDcard fsrw26 err -1000

ASAS Posts: 149
edited 2011-03-22 19:34 in Propeller 1
Hello!
I need big help!!
I try use obj fsrw26:
If no card I have the error "-1" (as expected)
With the card I have the error "-1000" (why?)

thanks to all that try help!

Andrei Sousa

Comments

  • lonesocklonesock Posts: 917
    edited 2011-03-22 11:57
    The -1000 is a timeout thrown while trying to initialize the card. Inside the safe_spi.spin file, you can find the "PRI read_slow" function. Inside there is a block of clde that looks like this:
    if( (cnt - SPI_block_index) > (clkfreq << 2) )
        crash( ERR_CARD_BUSY_TIMEOUT )
    
    That sets the timeout to 4 seconds. If you want to try a much longer timeout, just to see if this card is very slow, change to "(clkfreq << 4)" to make it wait 16 seconds.

    Can you try this code with another SD card? Is it possible there are problems with the electrical connections, mixing up pins, etc.?

    Jonathan
  • ASAS Posts: 149
    edited 2011-03-22 19:34
    Thanks for the help Jonathan!

    The error of timeout is because the old SDcard, with a new one I have the error -1 :(
    The pins are not mixed up, i already see hundred times!! :P

    I was looking with a voltimeter all the pins:
    WP - 0V (if no protect SDcard to Write)
    CD - 0V (if card inside)
    IRQ - 3.3V
    DO - 2.2v (IS NORMAL?) (to P0)
    SCLK - 3.3v (to P1)
    DI - 3.3V (to P2)
    CS - 3.3V (to P3)
    RW - 3.3V

    with the obj "fsrw-and-friends-1.7" i have the error "-13"...

    any suggestion is welcome!

    Andrei Sousa
Sign In or Register to comment.