SanDisk SDSDB-016G-A11 Product Manual - Page 58
Lock Card, Unlock Card
UPC - 619659055639
View all SanDisk SDSDB-016G-A11 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 58 highlights
Revision 2.2 Chapter 4 - SD Card Protocol Description SanDisk SD Card Product Manual 2. Define the block length (CMD16), given by the 8-bit card lock/unlock mode, the 8bit password size (in bytes), and the number of bytes of the currently used password. 3. Send the card lock/unlock command with the appropriate data block size on the data line including 16 bit CRC. The data block shall indicate the mode CLR_PWD, the length (PWDS_LEN) and the password itself . If the PWD and PWD_LEN content match the sent password and its size, then the content of the PWD Register is cleared and PWD_LEN is set to 0. If the password is not correct, the LOCK_UNLOCK_FAILED error bit will be set in the Status Register. • Lock Card The sequence for locking a card is as follows: 1. Select a card (CMD7), if not previously selected. 2. Define the block length (CMD16), given by the 8-bit card lock/unlock mode, the 8- bit password size (in bytes), and the number of bytes of the currently used password. 3. Send the Card Lock/Unlock command with the appropriate data block size on the data line including 16-bit CRC. The data block indicates the mode (LOCK), the length (PWDS_LEN) and the password (PWD) itself. If the PWD content equals to the sent password, the card will be locked and the cardlocked status bit will be set in the Status Register. If the password is incorrect, the LOCK_UNLOCK_FAILED error bit will be set in the Status Register. It is possible to set the password and to lock the card in the same sequence. In such case the host performs all the required steps for setting the password (as described above) including the bit LOCK set while the new password command is sent. If the password was previously set (PWD_LEN is not 0), the card will be locked automatically after power-on reset. An attempt to lock a locked card or to lock a card that does not have a password will fail and the LOCK_UNLOCK_FAILED error bit will be set in the Status Register unless it was done during a password definition or change operations. • Unlock Card The sequence for unlocking a card is as follows: 1. Select a card (CMD7), if not selected already. 2. Define the block length (CMD16), given by the 8-bit card lock/unlock mode, the 8- bit password size (in bytes), and the number of bytes of the currently used password. 3. Send the Card Lock/Unlock command with the appropriate data block size on the data line including 16-bit CRC. The data block will indicate the mode (UNLOCK), the length (PWDS_LEN) and the password (PWD) itself. If the PWD content equals to the sent password, the card will be unlocked and the cardlocked status bit will be cleared in the Status Register. If the password is incorrect, the LOCK_UNLOCK_FAILED error bit will be set in the Status Register. Unlocking occurs only for the current power session. As long as the PWD is not cleared the card will be locked automatically on the next power-up. The only way to unlock the card is by clearing the password. An attempt to unlock an unlocked card will fail and LOCK_UNLOCK_FAILED error bit will be set in the Status Register unless it was done during a password definition or change operations. © 2004 SanDisk Corporation 4-14 12/08/04