4. SD Memory Card Functional Description
4.3 Data Transfer Mode
4.3.10 Switch Function Command
4.3.10.4 Switch Function Status
The switch function status is the returned data block that contains function and current consumption information. The block length is predefined to 512 bits and the use of SET_BLK_LEN command is not necessary. Table 4-10 describes the status data structure.
The status bits of the response contain the information of the function group. Maximum current consumption will be used only for the new function added through this command. In this case, VDD_R_CURR_MIN, VDD_W_CURR_MIN, VDD_R_CURR_MAX and VDD_W_CURR_MAX values in the CSD register provides the current consumption when all card functions are set to the default state and can be used by spec 1.01 compatible hosts.
Bits Description Width 511:496 Maximum current consumption (0:Error, 1:1mA, 2:2mA… ,
65,535:65,535mA) under the function shown with [399:376] bits. The voltage to calculate current consumption is defined by ACMD41 (SD memory card) or CMD5 (SD I/O card).
Maximum current consumption indicates the total card current (memory portion) if the functions are switched.
The host should check the maximum current consumption and verify that it can supply the necessary current before mode 1 operation.
Maximum current consumption is average over 1second.
16 495:480 Function group 6, information. If a bit i is set, function i is supported 16 479:464 Function group 5, information. If a bit i is set, function i is supported 16 463:448 Function group 4, information. If a bit i is set, function i is supported 16 447:432 Function group 3, information. If a bit i is set, function i is supported 16 431:416 Function group 2, information. If a bit i is set, function i is supported 16 415:400 Function group 1, information. If a bit i is set, function i is supported 16 399:396 mode 0 - The function which can be switched in function group 6.
mode 1 - The function which is result of the switch command, in function group 6. 0xF shows function set error with the argument.
4
395:392 mode 0 - The function which can be switched in function group 5.
mode 1 - The function which is result of the switch command, in function group 5. 0xF shows function set error with the argument.
4
391:388 mode 0 - The function which can be switched in function group 4.
mode 1 - The function which is result of the switch command, in function group 4. 0xF shows function set error with the argument.
4
387:384 mode 0 - The function which can be switched in function group 3.
mode 1 - The function which is result of the switch command, in function group 3. 0xF shows function set error with the argument.
4
383:380 mode 0 - The function which can be switched in function group 2. 4
Bits Description Width 379:376 mode 0 - The function which can be switched in function group 1.
mode 1 - The function which is result of the switch command, in function group 1. 0xF shows function set error with the argument.
4
375:368 Data Structure Version
00h – bits 511:376 are defined 01h – bits 511:272 are defined 02h-FFh – reserved
8
367:352 Busy Status of functions in group 6. If bit [i] is set, function [i] is busy.
This field can be read in mode 0 and mode 1
16 351:336 Busy Status of functions in group 5. If bit [i] is set, function [i] is busy.
This field can be read in mode 0 and mode 1
16 335:320 Busy Status of functions in group 4. If bit [i] is set, function [i] is busy.
This field can be read in mode 0 and mode 1
16 319:304 Busy Status of functions in group 3. If bit [i] is set, function [i] is busy.
This field can be read in mode 0 and mode 1
16 303:288 Busy Status of functions in group 2. If bit [i] is set, function [i] is busy.
This field can be read in mode 0 and mode 1
16 287:272 Busy Status of functions in group 1. If bit [i] is set, function [i] is busy.
This field can be read in mode 0 and mode 1
16
271:0 Reserved (All '0') 272
Table 4-10: Status Data Structure 4.3.10.4.1 Busy Status Indication for Functions
Each bit [367-272] shows the busy status of corresponding functions; 0 indicates ready and 1 indicates busy. While the status is busy, the host should not change the corresponding function. Switch command mode 1 can be applied only to ready functions.
If the function failed to be switched in mode 1 operation and returns the current function number in the response, the function is considered busy. The mode 1 operation may affect the behavior of a function.
The mode 0 operations should be used to check the busy status of a function because it does not affect its behavior, especially, for function group 2 as defined below.
Function Group 2
303 302 301 300 299 298 297 296 295 294 293 292 291 290 289 288
0 VS 0 0 0 0 0 0 0 0 0 0 0 0 eC 0
Figure 4-5: Busy Status of ‘Command System’
Busy Status for 'Vendor Specific' 0:ready
1:busy
Busy Status for ‘eC’
0:ready 1:busy
4.3.10.4.2 Data Structure Version
Data Structure Version indicates effective bit fields of the Switch Function Status. The cards can set either 00h or 01h. When this field is set to 01, busy status indication is effective.
Data Structure Version Fields of Status Data Structure
00h 511:376 are defined
01h 511:272 are defined
02h-FFh Reserved Table 4-11: Data Structure Version
4.3.10.4.3 Function Table of Switch Command
Table 4-12, Table 4-13 and Table 4-14 shows possible combinations of the function switch.
“Argument” indicates 4-bit code specified in the argument of switch command (bits 23-0). “Busy Status” indicates the function is busy as defined below.
“Status Code” indicates 4-bit code in the Status Data Structure, bits 399-376.
Argument Busy Status Status Code Comment
0 Don’t Care 0 Status indicates a default function, which is always supported.
Ready =Arg.
Status indicates that the function specified in the argument is supported and can be switched.
Supported function
Busy Current Selected
Status indicates that the function specified in the argument is supported but cannot be switched because the function is busy.
Not Supported function Don’t Care Fh Status indicates that the function specified in the argument is not supported.
Fh Don’t Care Current
Selected Status indicates current selected function Table 4-12: Status Code of Mode 0 to Supported Function Group
Argument Busy Status Status Code Comment
0 Don’t Care 0 Default function can always be switched.
Ready =Arg.
Status indicates the same function number as specified in the argument, which means successful function change.
Supported function
Busy Current Selected
Switch function is canceled and status indicates current selected function.
Not Supported
function Don’t Care Fh
If one of the function groups indicates an error code (Fh), switch requests to all switch functions are canceled and the rest of the data in the Status Data Structure should be ignored.
Fh Don’t Care Current
Selected Status indicates current selected function Table 4-13: Status Code of Mode 1 to Supported Function Group
Argument Busy Status Status Code Comment 0 Don’t Care 0 Status always indicates 0.
Eh-1h Don’t Care Fh Status always indicates Fh.
Fh Don’t Care 0 Status always indicates 0.
Table 4-14: Status Code of Mode 0 and 1 to Unsupported Function Group
4.3.10.5 Relationship between CMD6 data & other commands