龙空技术网

eMMC深入浅出 第四章 eMMC指令 第四节 CMD6 换挡

Flash4U 47

前言:

现时兄弟们对“脚本提示index field”都比较关怀,兄弟们都需要剖析一些“脚本提示index field”的相关资讯。那么小编也在网摘上搜集了一些关于“脚本提示index field””的相关内容,希望小伙伴们能喜欢,咱们快快来学习一下吧!

Section 4 CMD6 Gear Shift第四节 CMD6 换挡

CMD6(Switch)is the soul of the eMMC, at least I think so. It controls the brain Ext_CSD to complete the variety of functions. Like the Gear shift in the car, it determines the speed gear (legacy low 26Mhz SDR speed, high 52Mhz SDR/DDR speed, 200Mhz SDR HS200/DDR HS400) or other modes (P-parking, D-Driving, R-reversing, N-Neutral).

CMD6(切换)是eMMC的灵魂,至少我这么认为。它控制着大脑Ext_CSD完成多种多样的功能。就像汽车的挂档一样,他决定了速度(传统低速26Mhz单沿采样模式,高速52Mhz单沿或者双沿采样,200Mhz单沿高速或者双沿高速)以及其他模式(P-停车,D-行车,R-倒档,N-空挡)。

CMD6 Parameters / CMD 参数

As usual, CMD6 is with a 32-bit argument which is divided in to 4 fields, actual 3. The last field Command Set is set to 0b00 (means two bits with ‘00’, ‘b’ means binary) always as default one. Then let us focus on the other 3 fields. CMD6 is born for the Ext_CSD. Two bits Accessing field will determine whether this ‘Switch’ is to write the byte value into the Ext_CSD based on the Value field or set/clear the bit value into the Ext_CSD based on the mask bit ‘1’ of the Value field. Normally we use byte writing, not bit setting/clearing. But this bit setting/clearing do bring us convenience that we only focus on the bit we want to change.

和通常一样,CMD6有一个32比特参数,分为4块,事实上3块。最后一块总是被设置成默认值0b00(表示两个比特的‘0’,‘b’指二进制)。那么让我们把重点放在其它三块。CMD6是为Ext_CSD而生。两个比特的访问块决定了这个‘切换’是把数值块里面的数以字节写入的方式或者是以比特‘1’掩码的方式设置/清除的方式写入Ext_CSD。通常我们用字节写入,而不是比特设置/清除。但是这种比特设置/清除确实带给我们便利,因为我们只需要注意那些我们需要改变的比特。

Index field indicates the ‘room number’ to the Ext_CSD specific field.

索引块指示了我们需要访问的Ext_CSD特定块的‘门牌号’。

Note that the response to CMD6 is R1b, not R1. ‘b’ means ‘busy’ here. R1b response format is the same as R1. However, a status should be tracked on the D0(Data Line 0) to see whether Ready (Signal High) or Busy (Signal Low). Only until in Ready status, the CMD6 (Switch) operation has been done. Thinking of you will be busy for a while (D0 Low busy start) when you want to deliver something (Value field), you knock the door of the room number (Index field) you got, then put things by accessing Field Byte Write or Bit Clear/Set into the room when Ext_CSD open that door, finally close the door and leave for the next delivery (D0 High Ready, Busy end).

注意CMD6的应答是R1b,而不是R1。‘b’这里指的是’忙’。R1b应答格式和R1是一样的。然而,需要查询D0(数据线0)上的准备好(高)或者忙(信号低)的状态。只有到准备好状态,CMD6(切换)操作才算完成。想想你要准备忙一会儿(D0拉低,忙开始) 当你准备递送些东西(数值块),你根据知道的门牌号(索引块)敲门,然后当Ext_CSD开门之后把东西送进去(访问块,字节写入或者比特设置/清除),最后关上门离开准备下一次递送(D0拉高准备好,忙结束)。

See, it is simple, we have done with CMD6. But remember CMD6 will be everywhere even you do not notice it. CMD6 also spreads in most our eMMC topics, try to find it.

看,很简单吧,CMD6聊完了。但是记住CMD6会无处不在甚至当你没有注意到它的时候。CMD6同样也散布在绝大多数我们要聊的eMMC话题里面,试试找一找它吧。

标签: #脚本提示index field