Shop OBEX P1 Docs P2 Docs Learn Events
FSRW - is "-1000" the new "-13" and if so, what does it mean? — Parallax Forums

FSRW - is "-1000" the new "-13" and if so, what does it mean?

HughHugh Posts: 362
edited 2009-10-05 20:14 in Propeller 1
Sorry chaps,

I tried searching for this, without success...

Having got data being read to/from an SD card with FSRW v1.6 I thought I'd neaten things up by moving it to a protoboard.

FRSW v2.4 is returning "-1000" and FSRW v1.6 is returning "-13" - are these both the same and if so, what do they mean?

Wiring - check!
Format - check!
Basepin = Prop pins - check!

Any other ideas? I'm even using the Sparkfun b/out board rather than an SD adapter.

Any thoughts gratefully received.

Hugh

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hugh - the thinking woman's Geoffrey Pyke.

Comments

  • HughHugh Posts: 362
    edited 2009-10-02 15:32
    Sorted. I am just stupid. Sorry!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
  • rokickirokicki Posts: 1,000
    edited 2009-10-02 16:42
    Hmm, maybe I need to put some effort into making those error messages more intelligible.

    Would you be willing to share what the problem was?
  • HughHugh Posts: 362
    edited 2009-10-02 18:55
    "Would you be willing to share what the problem was?"

    Yes I would. I hereby state, on a very public and easily accessible forum, that I, Hugh, am as stupid as a brick - as stupid as a brick that didn't go to school.

    I [noparse][[/noparse]wrongly] assumed that the pads circled in the attachment were a group of pads connected to VDD (due to the difference in colour). Once I linked them together and to VDD it worked perfectly. My dog has intestinal parasites that know better.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Hugh - the thinking woman's Geoffrey Pyke.
    615 x 476 - 98K
  • rokickirokicki Posts: 1,000
    edited 2009-10-02 21:55
    Hugh, thanks for the report; no need to be embarrassed. If you're not making
    mistakes fast and furiously, you're not trying hard enough, or you're doing the
    same thing over and over again.
  • KyeKye Posts: 2,200
    edited 2009-10-02 23:47
    You could make the error messages return a string.

    Like:

    abort string("Something went wrong!")

    Then it would be really easy to figure out the problem if a terminal is attached printing out the errors. The memory cost of doing this however is very high.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-10-03 02:00
    Perhaps just a list of messages and their numbers in the programs comments smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • lonesocklonesock Posts: 917
    edited 2009-10-03 18:00
    Some of the error codes are generated inside the lower level block driver. This is from the top of the mb_rawb_spi.spin file:
      ' Error codes
      ERR_CARD_NOT_RESET            = -1
      ERR_3v3_NOT_SUPPORTED         = -2
      ERR_OCR_FAILED                = -3
      ERR_BLOCK_NOT_LONG_ALIGNED    = -4
      '...
      ' These errors are for the assembly engine...they are negated inside, and need to be <= 511
      ERR_ASM_NO_READ_TOKEN         = 100
      ERR_ASM_BLOCK_NOT_WRITTEN     = 101
      ' NOTE: errors -128 to -255 are reserved for reporting R1 response errors
      '...
      ERR_SPI_ENGINE_NOT_RUNNING    = -999
      ERR_CARD_BUSY_TIMEOUT          = -1000
    


    I know the fsrw layer can have additional abort error codes. Rokicki and I have not collaborated yet on "One error code list to rule them all", but it's on our extended todo-list. Sorry for the confusion. Kye, you're right, that technique would be both easy to see what's going on (given a serial connection or display), and fairly memory expensive [noparse][[/noparse]8^)

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lonesock
    Piranha are people too.
  • ericballericball Posts: 774
    edited 2009-10-05 20:14
    Put in an ErrorString( ErrNo ) function in frsw.spin which returns a pointer to the error string. Put the same function in the block driver so if it's not an frsw error then it can be passed along to the block driver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Composite NTSC sprite driver: Forum
    NTSC & PAL driver templates: ObEx Forum
    OnePinTVText driver: ObEx Forum
Sign In or Register to comment.