User Manual

Secure Digital (SD) Bus Protocol Description
4-12 TriFlash with SD Interface Product Manual (Preliminary), Rev. 1.2 © 2002/2003 SANDISK CORPORATION
After receiving a block of data and completing the CRC check, the device will begin writing and hold the DAT0
line low if its write buffer is full and unable to accept new data from a new WRITE_BLOCK command. The host
may poll the status of the device with a SEND_STATUS command (CMD13) at any time, and the device will
respond with its status. The status bit READY_FOR_DATA indicates whether the device can accept new data or
whether the write process is still in progress. The host may deselect the device by issuing CMD7 (to select a
different device), which will displace the device into the Disconnect State and release the DAT line without
interrupting the write operation. When reselecting the device, it will reactivate busy indication by pulling DAT to
low if programming is still in progress and the write buffer is unavailable. Actually, the host may perform
simultaneous write operations to several devices by using an interleaving process. The interleaving process can be
done by accessing each device separately while other devices are in busy. This process can be done by proper CMD
and DAT0-3 line manipulations (disconnection of busy devices).
Pre-erase Setting Prior to a Multiple Block Write Operation
Setting a number of write blocks to be pre-erased (ACMD23) will make a following Multiple Block Write operation
faster compared to the same operation without preceding ACMD23. The host will use this command to define how
many write blocks are going to be sent in the next write operation. If the host terminates the write operation (using
stop transmission) before all the data blocks are sent to the device, the content of the remaining write blocks is
undefined (can be either erased or still have the old data). If the host sends a greater number of write blocks than are
defined in ACMD23, the device will erase blocks one by one (as new data is received). This number will be reset to
the default (=1) value after Multiple Blocks Write operation.
It is recommended to use this command preceding CMD25, so that SanDisk’s TriFlash will be faster for Multiple
Write Blocks operation. Note that the host must send ACMD23 just before the WRITE command if the host wants
to use the pre-erase feature. If not, pre-erase-count might be cleared automatically when another command (ex:
Security Application Commands) is executed.
Send Number of Written Blocks
Systems that use the PipeLine mechanism for data buffers management are, in some cases, unable to determine
which block was the last to be well written to the flash if an error occurs in the middle of a Multiple Blocks Write
operation. The device will respond to ACMD22 with the number of well-written blocks.
Erase
It is desirable to erase many write blocks simultaneously in order to enhance the data throughput. Identification of
these write blocks is accomplished with the ERASE_WR_BLK_START(CMD32),
ERASE_WR_BLK_END(CMD33) commands.
The host must adhere to the following command sequence: ERASE_WR_BLK_START, ERASE_WR_BLK_END
and ERASE (CMD38).
If an erase (CMD38) or address setting (CMD32, 33) command is received out of sequence, the device shall set the
ERASE_SEQ_ERROR bit in the status register and reset the whole sequence.
If an out of sequence command (except SEND_STATUS) is received, the device shall set the ERASE_RESET
status bit in the status register, reset the erase sequence and execute the last command.
If the erase range includes write protected sectors, they shall be left intact and only the non-protected sectors shall
be erased. The WP_ERASE_SKIP status bit in the status register shall be set.
The address field in the address setting commands is a write block address in byte units. The device will ignore all
LSB’s below the WRITE_BLK_LEN (see CSD) size.