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
SPI_MMC driver issue
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: SPI_MMC driver issue
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
Will be fixed in next releases, it has been already fixed in the repository.
thanks,
Giovanni