Linux MMC子系统 - 3.eMMC 5.1常用命令说明(1)
 2023.11.05    |      Linux MMC子系统    |     AilsonJack    |     暂无评论    |     90 views
By: AilsonJack
Date: 2023-11-05
个人博客: http://www.only2fire.com/
<section id="nice" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="font-size: 16px; color: black; padding: 0 10px; line-height: 1.6; word-spacing: 0px; letter-spacing: 0px; word-break: break-word; word-wrap: break-word; text-align: left; font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, &#39;PingFang SC&#39;, Cambria, Cochin, Georgia, Times, &#39;Times New Roman&#39;, serif;"><h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; border-bottom: 2px solid rgb(239, 112, 96); font-size: 1.3em;"><span class="prefix" style="display: none;"></span><span class="content" style="display: inline-block; font-weight: bold; background: rgb(239, 112, 96); color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;">概述</span><span class="suffix"></span><span style="display: inline-block; vertical-align: bottom; border-bottom: 36px solid #efebe9; border-right: 20px solid transparent;"> </span></h2><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">本文对eMMC 5.1协议定义的命令做一个简单的说明,以便在使用具体的命令时有个参考。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">eMMC 5.1协议定义的命令可以分为11类,具体分类描述如下:</p><ul data-tool="mdnice编辑器" style="list-style-type: disc;" class=" list-paddingleft-2"><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Basic commands (class 0 and class 1),基本命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Block-oriented read commands (class 2),面向块的读命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Class 3 commands,Class 3命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Block-oriented write commands (class 4),面向块的写命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Block-oriented write protection commands (class 6),面向块的写保护命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Erase commands (class 5),擦除命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">I/O mode commands (class 9),I/O模式命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Lock Device commands (class 7),设备锁定命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Application-specific commands (class 8),特定应用命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Security Protocols (class 10),安全协议命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Command Queue (Class 11),命令队列命令;</section></li></ul><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">本文主要对常用的6类命令进行说明,其他不常用的命令遇到时查看手册即可:</p><ul data-tool="mdnice编辑器" style="list-style-type: disc;" class=" list-paddingleft-2"><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Basic commands (class 0 and class 1),基本命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Block-oriented read commands (class 2),面向块的读命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Block-oriented write commands (class 4),面向块的写命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Erase commands (class 5),擦除命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Lock Device commands (class 7),设备锁定命令;</section></li><li><section style="margin-top: 5px; margin-bottom: 5px; line-height: 26px; text-align: left; color: rgb(1,1,1); font-weight: 500;">Application-specific commands (class 8),特定应用命令;</section></li></ul><h2 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; border-bottom: 2px solid rgb(239, 112, 96); font-size: 1.3em;"><span class="prefix" style="display: none;"></span><span class="content" style="display: inline-block; font-weight: bold; background: rgb(239, 112, 96); color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;">基本命令(class 0 and class 1)</span><span class="suffix"></span><span style="display: inline-block; vertical-align: bottom; border-bottom: 36px solid #efebe9; border-right: 20px solid transparent;"> </span></h2><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD0</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD0的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">bc</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0] 00000000</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">None</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">GO_IDLE_STATE</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Resets the Device to idle state</td></tr><tr style="border: 0; border-top: 1px solid #ccc; background-color: #F8F8F8;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">bc</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0] F0F0F0F0</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">None</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">GO_PRE_IDLE_STATE</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Resets the Device to pre-idle state</td></tr><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">---</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0]FFFFFFFA</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">None</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">BOOT_INITIATION</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Initiate alternative boot operation</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD0带参数0x00000000时,命令的类型为bc,此时CMD0的命令缩写为GO_IDLE_STATE,命令无响应,命令功能为复位设备,让设备进入idle状态。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD0带参数0xF0F0F0F0时,命令的类型为bc,此时CMD0的命令缩写为GO_PRE_IDLE_STATE,命令无响应,命令功能为复位设备,让设备进入pre-idle状态。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD0带参数0xFFFFFFFA时,命令无类型,此时CMD0的命令缩写为BOOT_INITIATION,命令无响应,命令功能为让设备进入boot operation模式。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">考虑到CMD0的兼容性,如果eMMC设备收到CMD0命令,并且参数是除了0xFFFFFFFA或者0xF0F0F0F0以外的其他值,eMMC设备在除了Inactive状态的其他任何状态下,eMMC设备会将CMD0命令视为设备复位命令,并让eMMC设备进入idle状态。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD1</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD1的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">bcr</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0] OCR with-out busy</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R3</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SEND_OP_COND</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Asks Device, in idle state, to send its Operating<br/>Conditions Register contents in the response on the<br/>CMD line.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD1的参数可以根据OCR寄存器的位定义来填写,命令的类型为bcr,此时CMD1的命令缩写为SEND_OP_COND,命令响应为R3,命令功能为在idle状态下要求eMMC设备通过R3响应返回它的OCR寄存器的值。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">如果eMMC设备不支持boot operation模式,或者eMMC设备仅仅支持eMMC 4.2或者更早的版本,或者BOOT_PARTITION_ENABLE位被清除,在power-on之后eMMC设备会自动进入idle状态。处于idle状态的eMMC设备,除非收到CMD1,否则会忽略所有的总线事务。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD1是一个特殊的同步命令,用来协商操作电压范围以及查看设备是否仍处在power-up序列。CMD1的响应除了包含eMMC设备的操作电压profile,还包含一个busy标志,用于指示eMMC设备仍处于power-up过程,并且没有准备好去identification。当R3中的busy位为0时,告诉Host当前的eMMC设备并没有准备好,Host需要重复发送CMD1和接收R3,直到eMMC设备准备好。当Host发送CMD1给eMMC设备,并且CMD1的参数带有有效电压范围,那么eMMC设备必须在1秒以内完成它的初始化。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">如果Host发送的CMD1的参数为0,那么就表示Host在询问eMMC卡的电压范围和busy状态。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD2</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD2的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">bcr</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R2</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ALL_SEND_CID</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Asks Device to send its CID number on the CMD line</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD2的参数[31:0]位域可以是任意值(默认填写0),默认将参数设置为0即可,命令的类型为bcr,CMD2的命令缩写为ALL_SEND_CID,命令响应为R2,命令功能为获取eMMC设备的CID寄存器内容,CID寄存器内容通过R2返回给Host。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD3</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD3的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SET_RELATIVE_ADDR</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Assigns relative address to the Device</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD3的参数[31:16]位域填写设置给eMMC设备的RCA,[15:0]位域可以是任意值(默认填写0),命令的类型为ac,CMD3的命令缩写为SET_RELATIVE_ADDR,命令响应为R1,命令功能为给eMMC设备分配RCA。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">一旦eMMC设备接收到CMD3,并且修改自身的RCA寄存器内容值为Host设置的RCA值之后,eMMC的设备状态将从<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(239, 112, 96);">Identification</code>状态切换为<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; background-color: rgba(27,31,35,.05); font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: rgb(239, 112, 96);">Stand-by</code>状态,并且eMMC设备不会再响应任何identification。此外,eMMC设备将把它的输出驱动方式从开漏输出(open-drain &nbsp;)切换为推挽输出(open-drain &nbsp;)。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD4</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD4的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">bc</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] DSR<br/>[15:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">None</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SET_DSR</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Programs the DSR of the Device</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD4的参数[31:16]位域填写设置给eMMC设备的DSR,[15:0]位域可以是任意值(默认填写0),命令的类型为bc,CMD4的命令缩写为SET_DSR,命令无响应,命令功能为设置eMMC设备的DSR(driver stage register)寄存器。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD5</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD5的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15]Sleep/Awake<br/>[14:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1b</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SLEEP_AWAKE</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Toggles the Device between Sleep state and Standby<br/>state.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD5的参数[31:16]位域填写RCA,[15]位的值表示该命令是Sleep还是Awake命令,[14:0]位域可以是任意值(默认填写0),命令的类型为ac,CMD5的命令缩写为SLEEP_AWAKE,命令响应为R1b,命令功能为将eMMC设备的状态设置为Sleep状态或者Awake状态。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">eMMC设备在Sleep状态下的电源消耗是最小的,在Sleep状态下eMMC设备仅仅响应复位命令(参数为0x00000000或者0xF0F0F0F0的CMD0或者硬件复位)和SLEEP_AWAKE命令(CMD5),所有其他命令都会被eMMC设备忽略。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD5的参数[15]位为1时表示该命令为Sleep命令。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD5的参数[15]位为0时表示该命令为Awake命令。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD6</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD6的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:26] Set to 0<br/>[25:24] Access<br/>[23:16] Index<br/>[15:8] Value<br/>[7:3] Set to 0<br/>[2:0] Cmd Set</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1b</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SWITCH</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Switches the mode of operation of the selected Device<br/>or modifies the EXT_CSD registers.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD6的参数[31:26]位域填写0,[25:24]位域设置访问模式,[23:16]位域填写EXT_CSD寄存器的索引,[15:8]位域填写Value值,[7:3]位域填写0,[2:0]位域填写要切换的命令集,命令的类型为ac,CMD6的命令缩写为SWITCH,命令响应为R1b,命令功能为切换eMMC设备的操作模式或者修改eMMC设备的EXT_CSD寄存器。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">访问模式及其说明如下图所示:</p><p id="_img_parent_tmp" style="text-align:center"><img src="/uploads/AilsonJack/2023.11.05/200130460981701.png" onclick="preview_image(&#39;/uploads/AilsonJack/2023.11.05/200130460981701.png&#39;)"/></p><blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: rgb(239, 112, 96); background: #fff9f9;"><p style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; color: black; line-height: 26px;">索引域([23:16]位域 Index)的取值范围为0-255,但是仅仅0-191范围内的值是有效的。如果索引域的值在192-255范围内,</p><p style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; color: black; line-height: 26px;">那么eMMC设备将不会执行任何的修改操作,并且SWITCH_ERROR状态位将被设置。</p></blockquote><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD7</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD7的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1/R1b</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SELECT/DESELECT_CARD</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Command toggles a device between the standby and<br/>transfer states or between the programming and<br/>disconnect states.<br/>NOTE In both cases the Device is selected by its own<br/>relative address and gets deselected by any other address;<br/>address 0 deselects the Device.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD7的参数[31:16]位域填写RCA,[15:0]位域可以是任意值(默认填写0),命令的类型为ac,CMD7的命令缩写为SELECT/DESELECT_CARD,命令响应为R1/R1b,命令功能为切换eMMC设备的状态,在standby状态和transfer状态之间切换或者在programming状态和disconnect状态之间切换。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">当eMMC设备处于Stand-by状态时,CMD7(命令参数中RCA域为设备的RCA)能够将eMMC设备状态切换到Transfer状态。当eMMC设备处于Transfer状态并且eMMC设备之前被选中时,CMD7(命令参数中RCA域为除设备RCA外的其他值)能够将eMMC设备状态切换到Stand-by状态并且释放eMMC设备与Host之间的连接状态。当Host发送CMD7(命令参数中RCA域为0x0000)给eMMC设备时,eMMC设备将切换到Stand-by状态。当eMMC设备处于Transfer状态时,如果接收到了来自Host的CMD7(命令参数中RCA域为设备的RCA),那么eMMC设备将忽略该命令,或许该命令会被视为非法命令。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">当eMMC设备处于Disconnect状态时,CMD7(命令参数中RCA域为设备的RCA)能够将eMMC设备状态切换到Programming状态。当eMMC设备处于Programming状态并且eMMC设备之前被选中时,CMD7(命令参数中RCA域为除设备RCA外的其他值)能够将eMMC设备状态切换到Disconnect状态并且释放eMMC设备与Host之间的连接状态。当eMMC设备处于Programming状态时,如果接收到了来自Host的CMD7(命令参数中RCA域为设备的RCA),那么eMMC设备将忽略该命令,或许该命令会被视为非法命令。</p><blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: rgb(239, 112, 96); background: #fff9f9;"><p style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; color: black; line-height: 26px;">R1 while selecting from Stand-By State to Transfer State;</p><p style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; color: black; line-height: 26px;">R1b while selecting from Disconnected State to Programming State.</p></blockquote><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD8</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD8的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">adtc</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SEND_EXT_CSD</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Device sends its EXT_CSD register as a block of data.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD8的参数[31:0]位域可以是任意值(默认填写0),命令的类型为adtc,CMD8的命令缩写为SEND_EXT_CSD,命令响应为R1,命令功能为请求eMMC设备通过数据块的方式将它的EXT_CSD寄存器内容发送给Host。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD9</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD9的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R2</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SEND_CSD</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Addressed Device sends its Device-specific data<br/>(CSD) on the CMD line.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD9的参数[31:16]位域填写RCA,[15:0]位域可以是任意值(默认填写0),命令的类型为ac,CMD9的命令缩写为SEND_CSD,命令响应为R2,命令功能为获取eMMC设备的CSD寄存器内容,CSD寄存器内容通过R2返回给Host。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD10</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD10的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R2</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SEND_CID</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Addressed Device sends its Device identification<br/>(CID) on CMD the line.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD10的参数[31:16]位域填写RCA,[15:0]位域可以是任意值(默认填写0),命令的类型为ac,CMD10的命令缩写为SEND_CID,命令响应为R2,命令功能为获取eMMC设备的CID寄存器内容,CID寄存器内容通过R2返回给Host。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD11</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">该命令已被废弃。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD12</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD12的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15:1] stuff bits<br/>[0] HPI</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1/R1b</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">STOP_TRANSMISSION</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Forces the Device to stop transmission. If HPI flag is<br/>set the device shall interrupt its internal operations in a<br/>well-defined timing.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD12的参数[31:16]位域填写RCA,[15:1]位域可以是任意值(默认填写0),[0]位填写HPI,命令的类型为ac,CMD12的命令缩写为STOP_TRANSMISSION,命令响应为R1/R1b,命令功能为强制eMMC设备停止传输,如果HPI标志被置位,那么eMMC设备会在一个合适的时机打断它的内部操作。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">在任意时刻,所有的数据读命令都可以被STOP_TRANSMISSION命令(CMD12)终止。数据传输将会结束并且eMMC设备将返回到Transfer状态。读命令包括:READ_SINGLE_BLOCK(CMD17),READ_MULTIPLE_BLOCK(CMD18),SEND_TUNING_BLOCK(CMD21),SEND_WRITE_PROT(CMD30)。</p><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">在任意时刻,所有的数据写命令都可以被STOP_TRANSMISSION命令(CMD12)终止。停止写命令的STOP_TRANSMISSION命令(CMD12)要在CMD7取消选择设备之前发送。写命令包括:WRITE_BLOCK(CMD24),WRITE_MULTIPLE_BLOCK(CMD25),PROGRAM_CID(CMD26),PROGRAM_CSD(CMD27)。</p><blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: rgb(239, 112, 96); background: #fff9f9;"><p style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; color: black; line-height: 26px;">RCA in CMD12 is used only if HPI bit is set. The argument does not imply any RCA check on the device side.</p></blockquote><blockquote class="multiquote-1" data-tool="mdnice编辑器" style="border: none; display: block; font-size: 0.9em; overflow: auto; overflow-scrolling: touch; border-left: 3px solid rgba(0, 0, 0, 0.4); color: #6a737d; padding-top: 10px; padding-bottom: 10px; padding-left: 20px; padding-right: 10px; margin-bottom: 20px; margin-top: 20px; border-left-color: rgb(239, 112, 96); background: #fff9f9;"><p style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0px; color: black; line-height: 26px;">R1 for read cases and R1b for write cases.</p></blockquote><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD13</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD13的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15] SQS<br/>[14:1] stuff bits<br/>[0] HPI</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">SEND_STATUS</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">In case SQS bit = 0: Addressed Device sends its status<br/>register. If HPI flag is set the device shall interrupt its<br/>internal operations in a well-defined timing.<br/>In case SQS bit = 1: indicate that this is a QSR query.<br/>In response device shall send the QSR (Queue Status<br/>Register). In this case HPI must be set to ‘0’.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD13的参数[31:16]位域填写RCA,[15]位填写SQS,[14:1]位域可以是任意值(默认填写0),[0]位填写HPI,命令的类型为ac,CMD13的命令缩写为SEND_STATUS,命令响应为R1,命令功能为查询eMMC设备的状态或者读取QSR寄存器值。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD14</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD14的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">adtc</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">BUSTEST_R</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">A host reads the reversed bus testing data pattern from<br/>a Device.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD14的参数[31:0]位域可以是任意值(默认填写0),命令的类型为adtc,CMD14的命令缩写为BUSTEST_R,命令响应为R1,命令功能为从eMMC设备读取翻转的总线测试数据。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD15</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD15的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">ac</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:16] RCA<br/>[15:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">None</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">GO_INACTIVE_STATE</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">Sets the Device to inactive state</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD15的参数[31:16]位域填写RCA,[15:0]位域可以是任意值(默认填写0),命令的类型为ac,CMD15的命令缩写为GO_INACTIVE_STATE,命令无响应,命令功能为将eMMC设备切换到inactive状态。</p><h3 data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; padding: 0px; font-weight: bold; color: black; font-size: 20px;"><span class="prefix" style="display: none;"></span><span class="content">CMD19</span><span class="suffix" style="display: none;"></span></h3><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD19的命令类型,参数,响应类型,命令缩写和描述如下表所示:</p><section class="table-container" data-tool="mdnice编辑器" style="overflow-x: auto;"><table><thead><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;" class="firstRow"><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Type</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Argument</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Resp</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Abbreviation</th><th style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; font-weight: bold; background-color: #f0f0f0; min-width: 85px;">Command Description</th></tr></thead><tbody style="border: 0;"><tr style="border: 0; border-top: 1px solid #ccc; background-color: white;"><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">adtc</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">[31:0] stuff bits</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">R1</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">BUSTEST_W</td><td style="font-size: 16px; border: 1px solid #ccc; padding: 5px 10px; text-align: left; min-width: 85px;">A host sends the bus test data pattern to a Device.</td></tr></tbody></table></section><p data-tool="mdnice编辑器" style="font-size: 16px; padding-top: 8px; padding-bottom: 8px; margin: 0; line-height: 26px; color: black;">CMD19的参数[31:0]位域可以是任意值(默认填写0),命令的类型为adtc,CMD19的命令缩写为BUSTEST_W,命令响应为R1,命令功能为Host发送总线测试数据给eMMC设备。</p></section>
欢迎关注博主的公众号呀,精彩内容随时掌握:
热情邀请仔细浏览下博客中的广告,万一有对自己有用或感兴趣的呢。◕ᴗ◕。。
如果这篇文章对你有帮助,记得点赞和关注博主就行了^_^,当然了能够赞赏博主,那就非常感谢啦!
注: 转载请注明出处,谢谢!^_^
暂无评论,要不要来个沙发
发表评论

 
Copyright © 2015~2023  说好一起走   保留所有权利   |  百度统计  蜀ICP备15004292号