GD32F20x User Manual
627
24.5.2.
Commands
Commands types
There are four kinds of commands defined to control the Card:
Broadcast commands (bc), no response
Broadcast commands with response (bcr), response from all cards simultaneously
Addressed (point-to-point) commands (ac), no data transfer on DAT
Addressed (point-to-point) data transfer commands (adtc), data transfer on DAT
Command format
All commands have a fixed code length of 48 bits, as show in
needing a transmission time of 1.92μs (25 MHz) 0.96μs (50 MHz) and 0.92us (52
MHz).
Figure 24-7. Command Token Format
0
1
Content
CRC
1
Total length = 48 bits
Table 24-2. Command format
Bit position
47
46
[45:40]
[39:8]
[7:1]
0
Width
1
1
6
32
7
1
Value
‘0’
‘1’
x
x
x
‘1’
Description
start bit
transmission bit
command index
argument
CRC7
end bit
A command always starts with a start bit (always 0), followed by the bit indicating the direction
of transmission (host = 1). The next 6 bits indicate the index of the command, this value being
interpreted as a binary coded number (between 0 and 63). Some commands need an
argument (e.g. an address), which is coded by 32 bits. A value denoted by ‘x’ in the table
above indicates this variable is dependent on the command. All commands are protected by
a CRC7. Every command code word is terminated by the end bit (always 1).
Command classes
The command set of the Card system is divided into several classes (See
. Each class supports a set of card functionalities.
determines the setting of CCC from the card supported
commands.
For SD cards, Class 0, 2, 4, 5 and 8 are mandatory and shall be supported. Class 7 except
CMD40 is mandatory for SDHC. The other classes are optional. The supported Card
Command Classes (CCC) are coded as a parameter in the card specific data (CSD) register
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...