09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Secure digital input/output interface (SDIO) <strong>RM0090</strong><br />

Stream read (MultiMediaCard only)<br />

READ_DAT_UNTIL_STOP (CMD11) controls a stream-oriented data transfer.<br />

This command instructs the card to send its data, starting at a specified address, until the<br />

SDIO card host sends STOP_TRANSMISSION (CMD12). The stop command has an<br />

execution delay due to the serial command transmission and the data transfer stops after<br />

the end bit of the stop command. When the end of the memory range is reached while<br />

sending data and no stop command is sent by the SDIO card host, any subsequent data<br />

sent are considered undefined.<br />

The maximum clock frequency for a stream read operation is given by the following equation<br />

and uses fields of the card specific data register.<br />

Maximumspeed= MIN( TRANSPEED, -----------------------------------------------------------------------<br />

( 8 × 2readbllen)<br />

( – NSAC)<br />

)<br />

TAAC × R2WFACTOR<br />

● Maximumspeed = maximum read frequency<br />

● TRANSPEED = maximum data transfer rate<br />

● readbllen = maximum read data block length<br />

● writebllen = maximum write data block length<br />

● NSAC = data read access time 2 in CLK cycles<br />

● TAAC = data read access time 1<br />

● R2WFACTOR = write speed factor<br />

If the host attempts to use a higher frequency, the card is not able to sustain data transfer. If<br />

this happens, the card sets the UNDERRUN error bit in the status register, aborts the<br />

transmission and waits in the data state for a stop command.<br />

28.4.8 Erase: group erase and sector erase<br />

The erasable unit of the MultiMediaCard is the erase group. The erase group is measured in<br />

write blocks, which are the basic writable units of the card. The size of the erase group is a<br />

card-specific parameter and defined in the CSD.<br />

The host can erase a contiguous range of Erase Groups. Starting the erase process is a<br />

three-step sequence.<br />

First the host defines the start address of the range using the ERASE_GROUP_START<br />

(CMD35) command, next it defines the last address of the range using the<br />

ERASE_GROUP_END (CMD36) command and, finally, it starts the erase process by issuing<br />

the ERASE (CMD38) command. The address field in the erase commands is an Erase<br />

Group address in byte units. The card ignores all LSBs below the Erase Group size,<br />

effectively rounding the address down to the Erase Group boundary.<br />

If an erase command is received out of sequence, the card sets the ERASE_SEQ_ERROR<br />

bit in the status register and resets the whole sequence.<br />

If an out-of-sequence (neither of the erase commands, except SEND_STATUS) command<br />

received, the card sets the ERASE_RESET status bit in the status register, resets the erase<br />

sequence and executes the last command.<br />

If the erase range includes write protected blocks, they are left intact and only unprotected<br />

blocks are erased. The WP_ERASE_SKIP status bit in the status register is set.<br />

The card indicates that an erase is in progress by holding SDIO_D low. The actual erase<br />

time may be quite long, and the host may issue CMD7 to deselect the card.<br />

861/1416 Doc ID 018909 Rev 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!