This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mounting fatfs using mmc_spi on at91sam7sek


On 8/9/07, Andrew Lunn <andrew@lunn.ch> wrote:
> On Thu, Aug 09, 2007 at 04:15:36PM +0200, Rune S??rensen wrote:
> > Dear all,
> >
> > I'm new to eCos (as well as this mailing list) so I hope my issue is
> > pretty basic.
> > I am trying to mount fatfs on a sdcard connected using spi, but the
> > mount() call never returns. More specific, it seems that a mutex lock
> > in mmc_spi_send_init() never becomes locked:
> >
> > spi.c :
> >
> > cyg_spi_transaction_begin(cyg_spi_device* device){
> > .
> > .
> >     while (!cyg_drv_mutex_lock(&(bus->spi_lock)));    <------ Does not return
> > .
> > }
>
> If you define DEBUG in
> packages/devs/disk/generic/mmc/current/src/mmc_spi.c what do you see?
> Does it find the MMC card? Does it read the partition table?
>
>      Andrew
>

This is the debug output:

SPI: spi_at91_init_bus[170]: bus base fffe0000
Entering cyg_user_start() function
test() trying to mount sdcard...
mmc_spi_send_init(): dev pointer 0x0x00201d80, 0
                   : begin pointer 0x00000000

Taking a look at the pointer to the spi structure used in
mmc_spi_send_init() it seems that the pointer does not point to a
valid structure (e.g. begin pointer is zero, the value of the spi_lock
mentioned earlier is bogus). So no, it does not find the MMC card or
the partition table since the spi communication has not been
established.


No one have a working example I can take a look at?

Best regards,

Rune

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]