eMMC5.1入门教程【2】协议杂谈

前言

接下来主要分析一下第1章中分享的eMMC5.1协议文档,读者可到第一章提供的链接中下载相关文档。

1 一些常用命令及其作用

协议 6.10 Commands的目录结构如下图(图一)所示:

图一 Commonds相关目录结构

首先来看6.10.1 Command types(命令类型),原文描述如下:

There are four kinds of commands defined to control the e •MMC:
broadcast commands (bc), no response,
broadcast commands with response (bcr),
addressed (point-to-point) commands (ac), no data transfer on DAT lines, and
addressed (point-to-point) data transfer commands (adtc), data transfer on DAT lines.
 
也就是说,控制eMMC的命令类型有4种,包括:bc、bcr、ac、adtc 。
其中,
种类一:bc是广播命令(broadcast commands),主机发完命令后,eMMC是不需要回复响应(response)的;
种类二:bcr是需要eMMC回复响应的广播命令(broadcast commands with response);
种类三:ac是数据线(DAT lines)无数据传输的(no data transfer)点对点(point-to-point)命令;
种类四:adtc是数据线有数据传输的点对点命令。
 
然后原文有如下描述:
All commands and responses are sent over the CMD line of the e •MMC bus. The command transmission always starts with the left bit of the bit string corresponding to the command codeword.

也就是说,命令的发送和响应都是在CMD线上完成的。发送或响应时,先发命令字左边的位(高位)。

然后到了6.10.2 Command format (命令格式)的描述,原文如下:

All commands have a fixed code length of 48 bits, needing a transmission time of 0.92 micro second at 52 MHz.
 
所有命令都是48位宽,以01开头,以1结尾。在时间上的要求是:“ 0.92 micro second at 52 MHz
图二 命令格式
 
然后到了 6.10.3 Command classes(命令类别)
原文有这么一句:
The supported Device Command Classes (CCC) are coded as a parameter in the Device specific data (CSD) register of each Device.
也就是说,查CSD寄存器可以知道支持第命令类别。
Class 0 is mandatory and shall be supported by all Devices. The other classes are either mandatory only for specific Device types or optional.
也就是说,Class 0 是所有eMMC都支持的,但是其他的Classes 就不一定是支持的,需要根据CSD寄存器的信息确定。具体方法后续会提及。
图三 命令类别的描述 

然后是6.10.4 Detailed command description(详细的命令描述)

内容过多,这里仅以CMD0为例:

图四 CMD0命令

前文提过,bc是广播命令(broadcast commands),CMD0带的参数为0x0或者0xF0F0F0F0时为广播命令,常用情况是:CMD0的参数是0x0,用于回到 idle 状态。

另外两种参数较少使用,带参数0xF0F0F0F0回到 pre-idle 状态。带参数0xFFFFFFFA用于初始化“可选的boot操作”,后续会详解。

2 时间控制问题

(待更新)详见协议6.15 Timings 章节。

3 几个重要的寄存器的简单描述

(待更新)详见协议7 Device Registers章节。

4 分区问题的概述

(待更新)详见协议6.2 Partition Management 章节。

评论 13
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

崭蓝码农

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值