SanDisk SDSDB-016G-A11 Product Manual - Page 58

Lock Card, Unlock Card

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

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123

Chapter 4 – SD Card Protocol Description
Revision 2.2
SanDisk SD Card Product Manual
© 2004 SanDisk Corporation
4-14
12/08/04
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 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 card-
locked 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 card-
locked 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.