eMMC——基本命令

目录

1. Basic commands (class 0 and class 1)

CMD0

CMD1

CMD2

CMD3

CMD4

CMD5

CMD6

CMD7

CMD8

CMD9

CMD10

CMD12

CMD13

CMD14

CMD15

CMD19

2. Block-oriented read commands (class 2)

CMD16

CMD17

CMD18

CMD21

3. Block-oriented write commands (class 4)

CMD23 (default)

CMD23 (packed)

CMD24

CMD25

CMD26

CMD27

CMD49


1. Basic commands (class 0 and class 1)

CMD0

Abbr.TypeArgumentRespDescription
GO_IDLE_STATEbc[31:0] 00000000NoneResets the Device to idle state
GO_PRE_IDLE_STATEbc[31:0] F0F0F0F0NoneResets the Device to pre-idle state
BOOT_INITIATION-[31:0]FFFFFFFANoneInitiate alternative boot operation

CMD1

Abbr.TypeArgumentRespDescription
SEND_OP_CONDbcr[31:0] OCR without busyR3Asks Device, in idle state, to send its Operating Conditions Register contents in the response on the CMD line.

CMD2

Abbr.TypeArgumentRespDescription
ALL_SEND_CIDbcr[31:0] stuff bitsR2Asks Device to send its CID number on the CMD line

CMD3

Abbr.TypeArgumentRespDescription
SET_RELATIVE_ADDRac[31:16] RCA, [15:0] stuff bitsR1Assigns relative address to the Device

CMD4

Abbr.TypeArgumentRespDescription
SET_DSRbc[31:16] DSR, [15:0] stuff bits-Programs the DSR of the Device

CMD5

Abbr.TypeArgumentRespDescription
SLEEP_AWAKEac[31:16] RCA, [15]Sleep/Awake, [14:0] stuff bitsR1bToggles the Device between Sleep state and Standby state.

CMD6

Abbr.TypeArgumentRespDescription
SWITCHac[31:26] Set to 0, [25:24] Access, [23:16] Index, [15:8] Value, [7:3] Set to 0, [2:0] Cmd SetR1bSwitches the mode of operation of the selected Device or modifies the EXT_CSD registers.

CMD7

Abbr.TypeArgumentRespDescription
SELECT/DESELECT_CARDac[31:16] RCA, [15:0] stuff bitsR1/R1bCommand toggles a device between the standby and transfer states or between the programming and disconnect states.

CMD8

Abbr.TypeArgumentRespDescription
SEND_EXT_CSDadtc[31:0] stuff bitsR1Device sends its EXT_CSD register as a block of data.

CMD9

Abbr.TypeArgumentRespDescription
SEND_CSDac[31:16] RCA, [15:0] stuff bitsR2Addressed Device sends its Device-pecific data (CSD) on the CMD line.

CMD10

Abbr.TypeArgumentRespDescription
SEND_CIDac[31:16] RCA, [15:0] stuff bitsR2Addressed Device sends its Device identification (CID) on CMD the line.

CMD12

Abbr.TypeArgumentRespDescription
STOP_TRANSMISSIONac[31:16] RCA, [15:1] stuff bits, [0] HPIR1/R1bForces the Device to stop transmission. If HPI flag is set the device shall interrupt its internal operations in a well-defined timing.

CMD13

Abbr.TypeArgumentRespDescription
SEND_STATUSac[31:16] RCA, [15] SQS, [14:1] stuff bits, [0] HPIR1In case SQS bit = 0: Addressed Device sends its status register. If HPI flag is set the device shall interrupt its internal operations in a well-defined timing. In case SQS bit = 1: indicate that this is a QSR query. In response device shall send the QSR (Queue Status Register). In this case HPI must be set to ‘0’

CMD14

Abbr.TypeArgumentRespDescription
BUSTEST_Radtc[31:0] stuff bitsR1A host reads the reversed bus testing data pattern from a Device.

CMD15

Abbr.TypeArgumentRespDescription
GO_INACTIVE_STATEac[31:16] RCA, [15:0] stuff bits-Sets the Device to inactive state

CMD19

Abbr.TypeArgumentRespDescription
BUSTEST_Wadtc[31:0] stuff bitsR1A host sends the bus test data pattern to a Device

NOTE 1 - CMD7, R1 while selecting from Stand-By State to Transfer State; R1b while selecting from Disconnected State to Programming State.
NOTE 2 - CMD12, RCA in CMD12 is used only if HPI bit is set. The argument does not imply any RCA check on the device side.
NOTE 3 - CMD12, R1 for read cases and R1b for write cases.


2. Block-oriented read commands (class 2)

CMD16

Abbr.TypeArgumentRespDescription
SET_BLOCKLENac[31:0] block lengthR1Sets the block length (in bytes) for all following block commands (read and write). Default block length is specified in the CSD

CMD17

Abbr.TypeArgumentRespDescription
READ_SINGLE_BLOCKadtc[31:0] data addressR1Reads a block of the size selected by the SET_BLOCKLEN command

CMD18

Abbr.TypeArgumentRespDescription
READ_MULTIPLE_BLOCKadtc[31:0] data addressR1Continuously transfers data blocks from Device to host until interrupted by a stop command, or the requested number of data blocks is transmitted If sent as part of a packed read command, the argument shall contain the first read data address in the pack (address of first individual read command inside the pack).

CMD21

Abbr.TypeArgumentRespDescription
SEND_TUNING_BLOCKadtc[31:0] stuff bitsR1128 clocks of tuning pattern (64 byte in 4bit mode or 128 byte in 8 bit mode) is sent for HS200 optimal sampling point detection.

NOTE 1 - CMD17 & CMD18, Data address for media =<2 32="" gb="" is="" a="" bit="" byte="" address="" and="" data="" for="" media=""> 2GB is a 32 bit sector (512 B) address.
NOTE 2 - CMD17, The transferred data must not cross a physical block boundary, unless READ_BLK_MISALIGN is set in the CSD register.


3. Block-oriented write commands (class 4)

CMD23 (default)

Abbr.TypeArgumentRespDescription
SET_BLOCK_COUNTac[31] Reliable Write Request, [30] ‘0’ non- packed, [29] tag request,[28:25] context ID, [24]: forced programming, [23:16] set to 0, [15:0] number of blocksR1Defines the number of blocks (read/write) and the reliable writer parameter (write) for a block read or write command.

CMD23 (packed)

Abbr.TypeArgumentRespDescription
SET_BLOCK_COUNTac[31] set to 0, [30] ‘1’ packed, [29:16] set to 0, [15:0] number of blocksR1Defines the number of blocks (read/write) for the following packed write command or for the header of the following packed read command.

CMD24

Abbr.TypeArgumentRespDescription
WRITE_BLOCKadtc[31:0] data addressR1Writes a block of the size selected by the

SET_BLOCKLEN command. |

CMD25

Abbr.TypeArgumentRespDescription
WRITE_MULTIPLE_BLOCKadtc[31:0] data addressR1Continuously writes blocks of data until a STOP_TRANSMISSION follows or the requested number of block received. If sent as a packed command (either packed write, or the header of packed read) the argument shall contain

the first read/write data address in the pack (address of first individual command inside the pack). |

CMD26

Abbr.TypeArgumentRespDescription
PROGRAM_CIDadtc[31:0] stuff bitsR1Programming of the Device identification register. This command shall be issued only once. The Device contains hardware to prevent this operation after the first programming. Normally this command is reserved for the manufacturer.

CMD27

Abbr.TypeArgumentRespDescription
PROGRAM_CSDadtc[31:0] stuff bitsR1Programming of the programmable bits of the CSD.

CMD49

Abbr.TypeArgumentRespDescription
SET_TIMEadtc[31:0] stuff bitsR1Sets the real time clock according to the RTC information in the 512 B data block.

NOTE 1 - CMD24 & CMD25, Data address for media =<2 32="" gb="" is="" a="" bit="" byte="" address="" and="" data="" for="" media=""> 2GB is a 32 bit sector (512 B) address.
NOTE 2 - CMD24, The transferred data must not cross a physical block boundary, unless READ_BLK_MISALIGN is set in the CSD register.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值