Problem with spi-sd-card.c (rtems-4.9.0)

Joel Sherrill joel.sherrill at
Thu Oct 2 18:22:11 UTC 2008

Are the addresses and sizes for the heap and
workspace reasonable? 

Are you blowing a stack?

Robert S. Grimes wrote:
> Seems I've moved backwards from last week.  I switched to 4.9.0, and
> that seemed fine - until I returned to the SD card driver.  I can't even
> get the basic card id functions to work - it fails before then.  Here
> are my (current) problems:
> 1. In spi-sd-card.c, sd_card_driver_init, sd_card_driver_get_entry fails
> to return pointer to driver.  Specifically, X_get_entry returns an
> incorrect value (0x51xxxx, for example, when it should be 0x48xxxx - the
> point of these addresses is only to point out the issue).  Then, the
> following call to CHECK_RVSC blasts the local variable e, setting it to 2!
> 2. If I manually correct (in the debugger) the value, when later a call
> to rtems_io_register_driver is made, the sd_card_disk_ops table only has
> an entry for the initialization_entry; all others are 0.
> 3. Finally, the card never leaves the "busy" state, in that the output
> line is always low.
> 4. I haven't noticed a CMD0 being sent to the card with the CS low; this
> seems to be needed to switch the card to SPI mode.  Am I missing something?
> Any ideas?
> -Bob
> P.S. I'm using the powerpc/virtex BSP, and the virtex SPI functions seem
> to be called correctly, and the SPI signals at the card seem correct.
> _______________________________________________
> rtems-users mailing list
> rtems-users at

Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

More information about the users mailing list