Page 1 of 1

SPI_MMC driver issue

Posted: Thu Apr 14, 2011 10:34 am
by JetForMe
I'm trying to get MMC working on a SAM7X board, based off the FAT demo.

When a card is inserted, the insertion handler tries do an mmcConnect() that ends up asserting in spiSelect(), because the state is not SPI_READY.

This is because mmcConnect() first calls spiStart(), which sets the state to SPI_READY, and then calls spiIgnore(), which sets the state to SPI_ACTIVE. (Nowhere in the code to I find anything that sets it back to SPI_READY.)

Then mmcConnect() calls send_command(), which first tries to all spiSelect(), but that asserts because the state is not SPI_READY.

Is there something wrong with my setup, or is there a bug in MMC?

Thanks,
Rick

Re: SPI_MMC driver issue

Posted: Thu Apr 14, 2011 3:10 pm
by Giovanni
Thanks Rick,

I will look into this.

Giovanni

Re: SPI_MMC driver issue

Posted: Sat Apr 16, 2011 7:22 am
by Giovanni
Confirmed, it is a bug in the SPI driver, it does not return to the SPI_READY state when a callback is not defined. It has no impact except triggering the assertion.

Will be fixed in next releases, it has been already fixed in the repository.

thanks,
Giovanni