Can't write to micro SD card after it's removed, replaced
Chad1
Posts: 26
Hi all,
I'm wondering if I can get help resolving the following issue. I'm debugging a portion of code that writes the date and time to a micro SD card (I'm using the propeller as an RTC). The date and time are sent after a pushbutton is pressed. I can successfully write data to the micro SD card upon every button press...that is, until I remove the micro SD card. When I re-insert it, I can't write any more data until I clear EEPROM and re-compile the code. Can someone tell me why and how to correct this problem?
Micro SD Card connector: http://www.digikey.com/product-detail/en/101-00660-68-6/101-00660-68-6-1-ND/2187099
Code Snapshot:
I'm wondering if I can get help resolving the following issue. I'm debugging a portion of code that writes the date and time to a micro SD card (I'm using the propeller as an RTC). The date and time are sent after a pushbutton is pressed. I can successfully write data to the micro SD card upon every button press...that is, until I remove the micro SD card. When I re-insert it, I can't write any more data until I clear EEPROM and re-compile the code. Can someone tell me why and how to correct this problem?
Micro SD Card connector: http://www.digikey.com/product-detail/en/101-00660-68-6/101-00660-68-6-1-ND/2187099
Code Snapshot:
Comments
http://learn.parallax.com/tutorials/language/spin/propeller-board-education-project-builders/sd-card-data-storage
Peter,
Not sure how to go about doing this in spin. Because I don't understand how my system knows that the micro SD card was removed, I can't really go about writing a test for it.
Regarding the card needing to be reinitialized, if you look at my code it looks like I'm re-initializing every time the program counter enters the loop. If you mean to do something else, can you provide example code/statements to better illustrate your thought?
Then it would help if you include all your code. Use the Propeller tool and archive the project and post the zip file.