バックナンバーはこちら。
https://www.simulationroom999.com/blog/In-vehicle-external-storage-backnumber/
はじめに
SDカードのSDモード通信に於いてのレスポンスについて。
登場人物
博識フクロウのフクさん

イラスト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モード通信に於いてのレスポンスについて

そういえば、SDモードの時のレスポンスの話をしてなかったことに気が付いた!

え?
SPIモードとは違うの?

まぁ使い方としては似てるけど、
そもそもデータ長が違う。

(それってほぼ別ものじゃん・・・。)
レスポンスの種類

SPIモードの時もそうだったけど、レスポンスにも種類がある。
以下がその種類。
- R1:大体のcommandのresponse
- R1b:busy付きresponse
- R2:CMD2(SEND_STATUS)、CMD10のresponse
- R3:ACMD41(READ_OCR)のresponse
- R6:CMD3(SEND_RELATIVE_ADDR)のresponse
- R7:CMD8(SEND_IF_COND)のresponse

SPIの時とほぼ一緒かな?
SPIモードのレスポンス

ちょっと違うね。
SDモードの場合はR6ってのが増えてる。
R6とは?

R6は何を返すの?

RCA(Relative Card Address)が取れる。
RCA(Relative Card Address)とは?

また新しい言葉が・・・。
そのRCAはなんなの?

CMD7(SELECT/DESELECT_CARD)の引数に使用される。
CMD7を経由して初めてSDの読み書きができるようになるんだけど、
SPIモードには無い仕様だね。

さっすると、認識用の鍵みたいなイメージになるのかな?

そうだね。
SDカードから取得したRCAを使って読み書き可能なモードに移行するんで、
先に鍵を渡して、その鍵でモード移行を許可する感じ。

といことはSDモードの方がSPIモードより手順が複雑ってことかー。

そうなるねー。

本当はR1,R1bについて話をしたかったけど、
これは次回説明だな。
まとめ

まとめだよ。
- SDカードのSDモード通信に於いてのレスポンスについて説明。
- SPIモードに無かったR6が追加。
- R6はRCA(Relative Card Address)を取得するもの。
- RCAはCMD7の引数に使われるもので、これが無いと読み書きモードへ移行できない。
- 上記使用はSPIモードには無いもの。
バックナンバーはこちら。
コメント