I was trying some stuff using the roland SD library.Then I plugged in the card in Windows 7.I says I need to farmat it,so I proceed to format.Then I plugged out the card from pc and inserted into the sd card module,it is still readable.So I went to sleep and when I wake up this morning,it tried to read the card from arduino again,but initialisation failed.I then uploaded the SDInfo code from SDFat library.It says that MBR failed.Plugging in the card into pc does not work.Device manager detected the card but no partition is shown in My Computer.
Looks like a hardware problem with the cards flash memory. The MBR is the first block of the card and is also first to be read by begin() and first to be written by the formatter. The problem could be a locked card.
is it MBR got deleted
No the MBR is just the first block but due to a hardware failure it can't be read or written. Worse, the cards' flash controller normally maps a new block if there is a problem. It appears the cards flash or flash controller is bad or the card is locked. The info in the CID and CSR registers can be read by SdInfo.
permanent lock is set on the card,preventing read/write access?
The card could be locked using a 16 byte password but this seems unlikely, none of the Arduino libraries have code to lock cards.
The card is responding to read and write with illegal command status 0X4. I guess it is possible since illegal command can mean the following.
There are different kinds of illegal commands:
• Commands that belong to classes not supported by the card (e.g. write commands in read only cards).
• Commands not allowed in the current state (e.g. CMD2 in Transfer State).
• Commands that are not defined (e.g. CMD5).
fat16lib:
Looks like a hardware problem with the cards flash memory. The MBR is the first block of the card and is also first to be read by begin() and first to be written by the formatter. The problem could be a locked card.
is it MBR got deleted
No the MBR is just the first block but due to a hardware failure it can't be read or written. Worse, the cards' flash controller normally maps a new block if there is a problem. It appears the cards flash or flash controller is bad or the card is locked. The info in the CID and CSR registers can be read by SdInfo.
permanent lock is set on the card,preventing read/write access?
The card could be locked using a 16 byte password but this seems unlikely, none of the Arduino libraries have code to lock cards.
The card is responding to read and write with illegal command status 0X4. I guess it is possible since illegal command can mean the following.
There are different kinds of illegal commands:
• Commands that belong to classes not supported by the card (e.g. write commands in read only cards).
• Commands not allowed in the current state (e.g. CMD2 in Transfer State).
• Commands that are not defined (e.g. CMD5).
Well the card is locked,since I was actually testing some locking code and it got bugged that the execute the lock code even not calling it.Now working on force erase the card,but I seem can't send CMD42 LOCK/UNLOCK.It return other value instead of 0.