465
/
838
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
Force erase
A forced erase operation can erase all data and passwords in the card. If the user forgets the password, the card can
be made available again through a forced wipe operation.
1.
If the card has not been selected before, use the CMD7 (SELECT/DESELECT_CARD) command to select a
card.
2.
Use CMD16 (SET_BLOCKLEN) to define the data block length, 8-bit card lock/unlock mode, 8-bit
PWDS_LEN indicates the number of bytes of the currently used password.
3.
Send a CMD42 (LOCK/UNLOCK) command with a suitable data block length on the data line and include a
16-bit CRC code. The data block contains the operating mode (ERASE=1) all other bits are 0.
4.
If and only if the ERASE bit in the data field is 1, all contents of the card will be erased, including the PWD and
PWDS_LEN fields. The card is no longer locked after erasing. If any other bit is not 0, set the
LOCK_UNLOCK_FAILED error bit in the status register, the data in the card remains unchanged, and the card
remains locked.
NOTE: Attempting to perform an erase operation on an already unlocked card will cause the operation to fail and
set the LOCK_UNLOCK_FAILED error bit in the status register.
18.4.11
Card status register
Card status register
Card status refers to the error and status information of the executed command, indicated in the response.
Generally, after receiving a command, the card will return the status information related to the command to the card
host. These status information may be stored in the local status register. This status information is called the card's
status field, and the response format R1 contains a 32-bit field called the card status.
Table 18-7 defines the different status messages.
Table 18-7 Card Status
Bits
Identifier
Type
Value
Description
Clear
condition
31
ADDRESS_OUT_OF_RAN
GE
EXR
‘0’=no error
‘1’=error
The address parameter in the command is out of
the allowed range for the card.
A multi-block or stream read/write operation (even
from a valid address) attempts to read or write
beyond the capacity of the card.
C
30
ADDRESS_MISALIGN
‘0’=no error
‘1’=error
The first data block defined by the address
parameter in the command (contrasted with the
current data block length) is not aligned with the
card's physical block.
A multi-block or stream read/write operation (even
if starting at a legal address) attempts to read or
write a block of data that is not aligned with the
C