SanDisk SDSDH-1024 Product Manual - Page 95

Read CID/CSD Registers, Reset Sequence

Page 95 highlights

Revision 2.2 Figure 5-6 No Data Operations From Host to Card DataIn From Card to Host Command DataOut Response Command Chapter 5 - SPI Protocol SD Card Product Manual From Host to Card From Card to Host Response Busy 5.7 Read CID/CSD Registers Unlike the SD bus protocol (where the register contents are sent as a command response), reading the contents of the CSD and CID registers in SPI mode is a simple read-block transaction. The card will respond with a standard response token followed by a data block of 16 bytes suffixed with a 16-bit CRC. The data time out for the CSD command cannot be set to the card TAAC since this value is stored in the CSD. Therefore, the standard response time-out value (NCR) is used for read latency of the CSD Register. 5.8 Reset Sequence The SD Memory Card requires a defined reset sequence. After power on reset or CMD0 (software reset) the card enters an idle state. At this state the only valid host commands are ACMD41 (SD_SEND_OP_COND), CMD58 (READ_OCR) and CMD59 (CRC_ON_OFF). For the Thick (2.1mm) SD Memory Card - CMD1 (SEND_OP_COND) is also valid - that means that in SPI mode CMD1 and ACMD41 have the same behavior, though the usage of CMD41 is preferable because it allows easy distinguishing between SD Memory Card and MultiMediaCard. For the Thin (1.4mm) SD Card CMD1 (SEND_OP_COND) is illegal command during the initialization that is done after power on. After Power On, once the card accepted valid ACMD41, it will be able to accept also CMD1 even if used after re-initializing (CMD0) the card. It was defined in such way in order to be able to distinguish between Thin SD Memory Card and MultiMediaCards (that supports CMD1 as well). The host must poll the card (by repeatedly sending CMD1 or ACMD41) until the 'in-idlestate' bit in the card response indicates (by being set to 0) that the card completed its initialization processes and is ready for the next command. In SPI mode, as opposed to SD mode, ACMD41 (or CMD1 as well, for 2.1mm-SD Card) has no operands and does not return the contents of the OCR register. Instead, the host may use CMD58 (available in SPI mode only) to read the OCR register. Furthermore, it is in the responsibility of the host to refrain from accessing cards that do not support its voltage range. The usage of CMD58 is not restricted to the initializing phase only, but can be issued at any time. © 2004 SanDisk Corporation 5-5 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-5
12/08/04
Figure 5-6
No Data Operations
5.7
Read CID/CSD Registers
Unlike the SD bus protocol (where the register contents are sent as a command response),
reading the contents of the CSD and CID registers in SPI mode is a simple read-block
transaction. The card will respond with a standard response token followed by a data block
of 16 bytes suffixed with a 16-bit CRC.
The data time out for the CSD command cannot be set to the card TAAC since this value is
stored in the CSD. Therefore, the standard response time-out value (N
CR
) is used for read
latency of the CSD Register.
5.8
Reset Sequence
The SD Memory Card requires a defined reset sequence. After power on reset or CMD0
(software reset) the card enters an idle state. At this state the only valid host commands are
ACMD41
(SD_SEND_OP_COND),
CMD58
(READ_OCR)
and
CMD59
(CRC_ON_OFF). For the Thick (2.1mm) SD Memory Card - CMD1 (SEND_OP_COND)
is also valid - that means that in SPI mode CMD1 and ACMD41 have the same behavior,
though the usage of CMD41 is preferable because it allows easy distinguishing between
SD Memory Card and MultiMediaCard. For the Thin (1.4mm) SD Card CMD1
(SEND_OP_COND) is illegal command during the initialization that is done after power
on. After Power On, once the card accepted valid ACMD41, it will be able to accept also
CMD1 even if used after re-initializing (CMD0) the card. It was defined in such way in
order to be able to distinguish between Thin SD Memory Card and MultiMediaCards (that
supports CMD1 as well).
The host must poll the card (by repeatedly sending CMD1 or ACMD41) until the ‘in-idle-
state’ bit in the card response indicates (by being set to 0) that the card completed its
initialization processes and is ready for the next command.
In SPI mode, as opposed to SD mode, ACMD41 (or CMD1 as well, for 2.1mm-SD Card)
has no operands and does not return the contents of the OCR register. Instead, the host may
use CMD58 (available in SPI mode only) to read the OCR register. Furthermore, it is in the
responsibility of the host to refrain from accessing cards that do not support its voltage
range.
The usage of CMD58 is not restricted to the initializing phase only, but can be issued at any
time.
Command
DataIn
Response
From Host
to Card
From Host
to Card
DataOut
Command
Response
Busy
From Card
to Host
From Card
to Host