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

Table 4-5, Lock/Unlock Function basic sequence for CMD42

Page 60 highlights

Revision 2.2 Chapter 4 - SD Card Protocol Description SanDisk SD Card Product Manual Table 4-5 Lock/Unlock Function (basic sequence for CMD42) CMD42 Parameter9 Bit3 Bit2 Bit1 Bit0 Current Card State PWD_LEN and PWD Result of the Function After power on Exist Card is locked 1 0 0 0 Locked Cleared Exist Card is unlocked Force Erase11 1 0 0 0 Unlocked Exist 1 0 0 0 Unlocked Cleared 0 1 0 0 Locked Exist 0 1 0 0 Unlocked Exist 0 1 0 0 Unlocked Cleared 0 1 0 1 Locked Exist 0 1 0 1 Unlocked Exist 0 1 0 1 Unlocked Cleared 0 0 1 0 Locked Exist 0 0 1 0 Unlocked Exist 0 0 1 0 Unlocked Cleared 0 0 0 1 Locked Exist 0 0 0 1 Unlocked Exist 0 0 0 1 Unlocked Cleared 0 0 0 0 Locked Exist 0 0 0 0 Unlocked Exist 0 0 0 0 Unlocked Cleared Other combinations Don't care Don't care Error Error Error Lock card Error Replace password & card remains locked Replace password & card is locked Set password & lock card Clear PWD_LEN & PWD to unlock card Clear PWD_LEN & PWD Error12 Replace password & card is unlocked Replace password & card is unlocked Set password & card remains unlocked Unlock card Error Error Error13 Card Status10 Bit25 Bit24 1 0 0 0 Table Table 4-2 4-2 0 1 0 1 1 1 0 to 1 0 to 1 0 1 1 0 0 to 1 0 0 to 1 0 1 to 0 0 0 0 0 1 1 to 0 0 0 0 0 0 1 to 0 0 0 1 0 1 0 or 1 1 Note: To replace password, the host should consider following cases. When PWD LEN and password data exist, the card assumes old and new passwords are set in the data structure. When PWD LEN and PWD are cleared, the card assumes only new password is set in the data structure. In this case, the host shall not set old password in the data structure; otherwise, unexpected password is set. 9 CMD42 parameter in the data: Bit3-ERASE, Bit2-LOCK_UNLOCK, Bit1-CLR_PWD, Bit0-SET_PWD. 10 Related bits in the card status: Bit25-CARD_IS_LOCKED, Bit24-LOCK_UNLOCK_FAILED. 11 Refer to Table 4-6. 12 Refer to Note 1 in Table 4-6. 13 Ibid. © 2004 SanDisk Corporation 4-16 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-16
12/08/04
Table 4-5
Lock/Unlock Function (basic sequence for CMD42)
CMD42 Parameter
9
Card Status
10
Bit3
Bit2
Bit1
Bit0
Current
Card State
PWD_LEN
and PWD
Result of the
Function
Bit25
Bit24
Exist
Card is locked
1
0
After power on
Cleared
Card is unlocked
0
0
1
0
0
0
Locked
Exist
Force Erase
11
Table
4-2
Table
4-2
1
0
0
0
Unlocked
Exist
Error
0
1
1
0
0
0
Unlocked
Cleared
Error
0
1
0
1
0
0
Locked
Exist
Error
1
1
0
1
0
0
Unlocked
Exist
Lock card
0 to 1
0 to 1
0
1
0
0
Unlocked
Cleared
Error
0
1
0
1
0
1
Locked
Exist
Replace password &
card remains locked
1
0
0
1
0
1
Unlocked
Exist
Replace password &
card is locked
0 to 1
0
0
1
0
1
Unlocked
Cleared
Set password & lock
card
0 to 1
0
0
0
1
0
Locked
Exist
Clear PWD_LEN &
PWD to unlock card
1 to 0
0
0
0
1
0
Unlocked
Exist
Clear PWD_LEN &
PWD
0
0
0
0
1
0
Unlocked
Cleared
Error
12
0
1
0
0
0
1
Locked
Exist
Replace password &
card is unlocked
1 to 0
0
0
0
0
1
Unlocked
Exist
Replace password &
card is unlocked
0
0
0
0
0
1
Unlocked
Cleared
Set password & card
remains unlocked
0
0
0
0
0
0
Locked
Exist
Unlock card
1 to 0
0
0
0
0
0
Unlocked
Exist
Error
0
1
0
0
0
0
Unlocked
Cleared
Error
0
1
Other combinations
Don’t care
Don’t care
Error
13
0 or 1
1
Note:
To replace password, the host should consider following cases. When PWD LEN
and password data exist, the card assumes old and new passwords are set in the data
structure. When PWD LEN and PWD are cleared, the card assumes only new password is
set in the data structure. In this case, the host shall not set old password in the data
structure; otherwise, unexpected password is set.
9
CMD42 parameter in the data: Bit3—ERASE, Bit2—LOCK_UNLOCK, Bit1—CLR_PWD, Bit0—SET_PWD.
10
Related bits in the card status: Bit25—CARD_IS_LOCKED, Bit24—LOCK_UNLOCK_FAILED.
11
Refer to Table 4-6.
12
Refer to Note 1 in Table 4-6.
13
Ibid.