SanDisk SDSDH-1024 Product Manual - Page 94

Multiple Block Write Operation

Page 94 highlights

Revision 2.2 Chapter 5 - SPI Protocol SD Card Product Manual Every data block has a prefix or 'start block' token (one byte). After a data block is received the card will respond with a data-response token, and if the data block is received with no errors, it will be programmed. As long as the card is busy programming, a continuous stream of busy tokens will be sent to the host (effectively holding the dataOut line low). Once the programming operation is completed, the host must check the results of the programming using the SEND_STATUS command (CMD13). Some errors (e.g., address out of range, write protect violation, etc.) are detected during programming only. The only validation check performed on the data block and communicated to the host via the dataresponse token is CRC and general Write Error indication. In multiple-block write operations, the stop transmission is done by sending, at the beginning of the next block, a Stop Tran token, instead of a Start Block token. In case of Write Error indication (on the data response) the host shall use SEND_NUM_WR_BLOCKS (ACMD22) in order to get the number of well written write blocks. The data token's description is given in Section 5.17. Figure 5-5 Multiple Block Write Operation From host to card Start block From card token to host Data from host to card Data response and busy from card DataIn Command Data Block Data Block Data from host to card Stop tran token DataOut Response Data_Response Busy Data_Response Busy Busy Resetting the CS signal while the card is busy does not terminate the programming process. The card releases the dataOut line (tristate) and continues to program. If the card is reselected before the programming has finished, the dataOut line will be forced back to low and all commands will be rejected. Re-setting a card (using CMD0) will terminate any pending or active programming operation. This may destroy the data formats on the card. It is the host's responsibility to prevent it. 5.6 Erase and Write Protect Management The erase and write protect management procedures in the SPI mode are identical to the SD Bus mode. While the card is erasing or changing the write protection bits of the predefined sector list it will be in a busy state and will hold the dataOut line low. Figure 5-6 illustrates a "no data" bus transaction with and without busy signaling. © 2004 SanDisk Corporation 5-4 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 5 – SPI Protocol
Revision 2.2
SD Card Product Manual
© 2004 SanDisk Corporation
5-4
12/08/04
Every data block has a prefix or ‘start block’ token (one byte). After a data block is
received the card will respond with a data-response token, and if the data block is received
with no errors, it will be programmed. As long as the card is busy programming, a
continuous stream of busy tokens will be sent to the host (effectively holding the dataOut
line low).
Once the programming operation is completed, the host must check the results of the
programming using the SEND_STATUS command (CMD13). Some errors (e.g., address
out of range, write protect violation, etc.) are detected during programming only. The only
validation check performed on the data block and communicated to the host via the data-
response token is CRC and general Write Error indication.
In multiple-block write operations, the stop transmission is done by sending, at the
beginning of the next block, a Stop Tran token, instead of a Start Block token. In case of
Write
Error
indication
(on
the
data
response)
the
host
shall
use
SEND_NUM_WR_BLOCKS (ACMD22) in order to get the number of well written write
blocks. The data token’s description is given in Section 5.17.
Figure 5-5
Multiple Block Write Operation
Resetting the CS signal while the card is busy does not terminate the programming process.
The card releases the dataOut line (tristate) and continues to program. If the card is re-
selected before the programming has finished, the dataOut line will be forced back to low
and all commands will be rejected.
Re-setting a card (using CMD0) will terminate any pending or active programming
operation. This may destroy the data formats on the card. It is the host’s responsibility to
prevent it.
5.6
Erase and Write Protect Management
The erase and write protect management procedures in the SPI mode are identical to the
SD Bus mode. While the card is erasing or changing the write protection bits of the
predefined sector list it will be in a busy state and will hold the dataOut line low. Figure 5-6
illustrates a “no data” bus transaction with and without busy signaling.
Command
DataIn
From host
to card
Data from
host to
card
DataOut
Data
Block
Data_Response
Busy
Data from
host to
card
From card
to host
Response
Start block
token
Data
response
and busy
from card
Data_Response
Busy
Busy
Data
Block
Stop tran
token