Specifications

©Copyright 2001-2013 SD Group (Panasonic, SanDisk, Toshiba) and SD Card Association
Physical Layer Simplified Specification Version 4.10
110
4.15 Set Block Count Command
CMD12 has been used to stop multiple-block Read / Write operation. However, CMD12 is timing
dependent and it is difficult to control timing to issue CMD12 at exact timing. As UHS104 card has large
delay variation between clock and data, CMD23 is useful for the host to stop multiple read / write
operation instead of CMD12. Host is not necessary to control timing of CMD12. This command is
applicable to always 512-byte block length read/write operation and then SDSC card does not support
this command. Support of CMD23 is mandatory for UHS104 card.
Support of CMD23 is defined in SCR. The response type of CMD23 is R1 and busy is not indicated.
CMD23 is accepted in transfer state and effective to the multiple-block read/write command (CMD18 or
CMD25) just behind CMD23. If another command follows CMD23, set block count is canceled
(including CMD13). If command CRC error occurs, the card does not return R1 response for CMD23. In
this case, Set block count is not valid and retry of CMD23 is required. If multiple CMD23 are issued, the
last one is valid.
Figure 4-58 shows the definition of CMD23. If block count in the argument is set to 0, CMD23 has no
effect. The block count value set by CMD23 is not checked by the card and then CMD23 does not
indicate any error in the response (A previous command error is indicated in the response of CMD23). If
illegal block count is set, out of range error will be indicated during read/write operation (For example,
data transfer is stopped at user area boundary). Host needs to issue CMD12 if any error is detected in
the CMD18 and CMD25 operations. If a CMD25 is aborted and the amount of data transferred is less
than the amount of data indicated by the preceding CMD23, then the area specified by CMD23 that is
unwritten may contain undefined data. If the amount of data transferred is greater than the amount of
data indicated by the preceding CMD23, then the extra data is not written.
Figure 4-58 : Set Block Count Command
CMD
CMD23 R1
Se
t Block Count Command
DAT[0]
32
-bit
Block Count
1
xx010
11110
ECRC7
Index
TS
32
-bit
Block Count
1xx01
011110
E
CRC7Index
TS
CMD18/25 R1
Block Count
00000000h: No Effect
00000001h: 1 block
00000002h: 2 blocks
............
FFFFFFFFh: 4294967295 blocks
No error is indicated by CMD23.