バックナンバーはこちら。
https://www.simulationroom999.com/blog/In-vehicle-external-storage-backnumber/
はじめに
SDカードのSDモード通信の初期化シーケンスのCMD2(ALL_SEND_CID)によるCIDの取得について。
CID(Card IDentification)の詳細の話の続き。
登場人物
博識フクロウのフクさん

イラストACにて公開の「kino_k」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=iKciwKA9&area=1
エンジニア歴8年の太郎くん

イラストACにて公開の「しのみ」さんのイラストを使用しています。
https://www.ac-illust.com/main/profile.php?id=uCKphAW2&area=1
SDカードのSDモード通信の初期化シーケンス詳細

今回は「CMD2(ALL_SEND_CID)によるCIDの取得」に於いての
CID(Card IDentification)の具体的な内容の話になる。
- CMD8(SEND_IF_COND)によるSDv2判定及びサポート電圧判定。
- ACMD41(SD_SEND_OP_COND)によるHigh Capacity設定とVoltage Switch可否判定。
- CMD11(VOLTAGE_SWITCH)によるVoltage Switch。
- CMD2(ALL_SEND_CID)によるCIDの取得。← これ4回目/全4回
- CMD3(SEND_RELATIVE_ADDR)によるPublished RCAの取得。
- CMD7(SELECT/DESELECT_CARD)によるTransfer State(tran)遷移。

全体フローはこれ。


CID(Card IDentification)の内訳はこれ。
Name | Field | Width | Bit position |
---|---|---|---|
Manufacturer ID | MID | 8 | [127:120] |
OEM/Application ID | OID | 16 | [119:104] |
Product name | PNM | 40 | [103:64] |
Product revision | PRV | 8 | [63:56] |
Product serial number | PSN | 32 | [55:24] |
reserved | – | 4 | [23:20] |
Manufacturing date | MDT | 12 | [19:8] |
CRC7 checksum | CRC | 7 | [7:1] |
not used,always 1 | – | 1 | [0:0] |
CID (Card IDentification)のProduct serial number

Product serial numberはもうそのままでしょう。

そうだね。
32bit長のシリアルナンバーが埋まってるだけだ。

とはいえ、製造側からすると重要な情報ではあるけどね。

そうなの?

恐らく、シリアルナンバーで製造場所とか販売先とかを分かるように管理してるだろうから、
不具合が有った場合は、同時期同一場所で製造したものは回収するとか?

リコールか!
CID (Card IDentification)のManufacturing date

Manufacturing dateも名前のまんまだろうね。
製造した日時が入ってると思う。

うん。
製造日は、年(y)を表す8ビットと月(m)を表す4ビットの16進数2桁で構成されてる。
合わせて12bit長のフィールドで、
mフィールド[11:8]は月コード。1 = 1月。
y “フィールド[19:12]は年コード。0 = 2000。
例として、製造日「2001年4月」の日付フィールドの2進数値は、以下のようになる。
00000001 0100

ほう。
分かるのは年と月までかー。

というわけでメーカ側としてはシリアルナンバーで実際の詳細な製造年月日を特定できるようにしていると思うよ。

なるほどー。

というわけで、CID(Card IDentification)の話は終了~。
まとめ

まとめだよ。
- CID(Card IDentification)の詳細の話の続き。
- Product serial numberは32bit長のシリアルナンバー
- Manufacturing dateは12bit長のフィールド。
- 8bitで年、4bitで月を表現。
バックナンバーはこちら。
コメント