I have a single SD card being multiplexed between two devices. Device A is under my control, device B is not. Device A controls the multiplexer. Device A also controls Device B so it knows when Device B should be writing to disk. I can write to the SD card with device A and Device B. This has been thoroughly tested. My problems come when sharing. I am switching the multiplexer only when appropriate so you can assume that the multiplexer is correctly assigned to the device which needs it. The problem is...
If device A initializes the card and then device B attempts to write to it
-> FAIL
If device B initializes the card and then device A attempts to write to it
-> SUCCESS
If device A initializes the card, the card is removed then inserted, and then device B attempts to write to it -> SUCCESS
So, it appears that I need to place the card back into this state prior to device B accessing it. Device B is not getting the responses it wants from the card during its initialization so it fails. How do I place the card back into this state (as if the card were just inserted)? I've tried issuing CMD0 at this point but it doesn't seem to help. My only other thought is a hardware modification in which I can switch VDD to the card (simulating a removal/insertion).
Thoughts?
--------------------------------------- Posted through