Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After an SD card is erased, what value is read from the card? All bits clear or all bits set?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

The Official Specs from the SD Association should be your first port of call:

4.3.5 Erase

It is desirable to erase many write blocks simultaneously in order to enhance the data throughput.

Identification of these write blocks is accomplished with the ERASE_WR_BLK_START (CMD32), ERASE_WR_BLK_END (CMD33) commands.

The host should adhere to the following command sequence: ERASE_WR_BLK_START, ERASE_WR_BLK_END and ERASE (CMD38).

If an erase (CMD38) or address setting (CMD32, 33) command is received out of sequence, the card shall set the ERASE_SEQ_ERROR bit in the status register and reset the whole sequence.

If an out of sequence command (except SEND_STATUS) is received, the card shall set the ERASE_RESET status bit in the status register, reset the erase sequence and execute the last command.

If the erase range includes write protected sectors, they shall be left intact and only the non-protected sectors shall be erased. The WP_ERASE_SKIP status bit in the status register shall be set.

The address field in the address setting commands is a write block address in byte units. The card will ignore all LSB's below the WRITE_BL_LEN (see CSD) size.

As described above for block write, the card will indicate that an erase is in progress by holding DAT0 low. The actual erase time may be quite long, and the host may issue CMD7 to deselect the card or perform card disconnection, as described in the Block Write section, above.

The data at the card after an erase operation is either '0' or '1', depends on the card vendor.

The SCR register bit DATA_STAT_AFTER_ERASE (bit 55) defines whether it is '0' or '1'.

share|improve this answer
2  
Thanks, clear case of RTFM. –  William J Bagshaw Mar 19 '13 at 0:42

A file system really only checks the header of a file, sees the header says it blank and moves on. The OS then sees that as space that can be used, but until those sectors / blocks are over written, the data is still there and easily recoverable. If you want to see it, download the free Recuva, delete some files and then browse that directory with Recuva. It should scare you.

http://www.piriform.com/recuva

share|improve this answer
    
Erasing an SD card removes the data, this is not deleting a files or formatting. When writing to an SD card it typically has to erase what is there first and then write the new data. Erasing is done automatically as part of a write. It can also be done as part of the format. Not only does it remove the data, the first time the disk is written the erase phase is not required. My question is if the SD card is erase, what value is read from the erase parts of the SD card? All bits clear or all bits set? –  William J Bagshaw Mar 19 '13 at 0:21
    
An erasure or format is the same thing, the files are marked "blank" or deleted, but the data is still there. It applies to SD, CF, HD and SSD. That is why there are special requirements for government agencies to dispose of and media, erased is not the same as blank, although Windows does not see the difference. –  AthomSfere Mar 19 '13 at 0:26
    
The question is not about deleting files. See formatting options in <sdcard.org/downloads/formatter_4/SDFormatter_4e.pdf>; The SD card can be erased. The security issue is that even if data is "overwritten" or "erased" clever people can retrieve the original data. Software shredders repeatedly over write the data again and again. Governments physically shred storage media, hard disks too. The question is about the erase of the SD card. Not about deleting a file or the secure removal of the original data. Just what value does an SD card erase to, all bits set or all bits clear. –  William J Bagshaw Mar 19 '13 at 0:36
    
You are missing the point, erasure, deleting, formatting are all equivalent. Your PDF did not work, but SD Formatter "Formats" the drive, meaning it erases the data (marked blank) and then a new file system is written. Also, you did not mention you were looking at SD's formatter and had questions about their terminology. - QUICK - FULL (Erase) - FULL OverWrite Actually tells me alot of what you were asking –  AthomSfere Mar 19 '13 at 0:50
    
@AthomSfere: He's not missing the point, you are. He wasn't looking at SD Formatter or any particular utility, but was asking about the specs for state of an SD card after an erase operation (the terminology is not program related). Your answer is valid for software/OS-controlled data erasure on HDDs, but note that an SD card has a controller chip that carries out the actual erase operation after the SD_Erase() function is called. That's why the data after an erase op is vendor dependent. –  Karan Mar 19 '13 at 1:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.