SPI_MMC driver issue
Posted: Thu Apr 14, 2011 10:34 am
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
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