SD卡_SPI总线协议
7KH6'&DUGZDNHVXSLQWKH6'%XVPRGH,WZLOOHQWHU63,PRGHLIWKH&6VLJQDOLVDVVHUWHG QHJDWLYH GXULQJ WKHUHFHSWLRQRIWKHUHVHWFRPPDQG &0' ,IWKHFDUGUHFRJQL]HVWKDWWKH6'%XVPRGHLVUHTXLUHGLWZLOOQRW UHVSRQG WR WKH FRPPDQG DQG UHPDLQ LQ WKH 6' %XV PRGH ,I 63, PRGH LV UHTXLUHG WKH FDUG ZLOO VZLWFK WR 63, PRGHDQGUHVSRQGZLWKWKH63,PRGH5UHVSRQVH
63, ᘏ㒓ण䆂Ⳃᔩ
63,ᘏ㒓ण䆂
ᓣ䗝ᢽ
ᘏ㒓Ӵ䗕ֱᡸ
᭄ⱘ䇏প
᭄ܹݭ
᪺䰸ֱݭᡸ໘⧚
䇏প&,'&6'ᆘᄬ఼
ԡ乎ᑣ
ᯊ䩳᭄ؐ
63,⬉⇨ষ
63,ᘏ㒓᪡ᴵӊ˄⦃๗˅
ᘏ㒓ᯊ䩳
䰘ᔩ˖
㣅᭛⡍⅞ੑҸ㸼
㣅᭛䗮⫼ੑҸ㸼
ᄬ఼ټ䰉߫
ѻક㾘Ḑ㸼
Џࠊ఼䆒䅵খ㗗˄ㅔҟˈ᮴ᅲ䰙ݙᆍ˅
䝛䜦 2007.12.2
៥ⱘϾҎぎ䯈˖JVVRYYYKEFGXEQOEP!
SPI ᘏ㒓ण䆂 SD ᘏ㒓ण䆂ⱘᑨㄨ㸠Ў᳝ϟ߫ϝ໘ⱘϡৠ⚍˖ 1. 㹿䗝ЁⱘवᘏᰃᇍੑҸߎخᑨㄨ˗ 2. Փ⫼ⱘᑨㄨ㒧ᵘᰃ 8 16 ԡⱘ˗ 3. ᔧ䖭Ͼव⺄ࠄϔϾ᭄Ẕ㋶䯂乬ˈᅗᇚ⫼ϔϾ䫭䇃ᑨㄨᴹಲㄨ˄পҷњॳܜᳳᳯⱘ᭄ഫ˅㗠ϡᰃ SD ᘏ 㒓ण䆂ᓣϟⱘ䍙ᯊDŽ
,QDGGLWLRQWRWKHFRPPDQGUHVSRQVHHYHU\GDWDEORFNVHQWWRWKHFDUGGXULQJZULWHRSHUDWLRQVZLOOEHUHVSRQGHG ZLWKDVSHFLDOGDWDUHVSRQVHWRNHQ$GDWDEORFNPD\EHDVELJDVRQHFDUGZULWHEORFN :5,7(B%/B/(1 DQGDV VPDOODVDVLQJOHE\WH 127(
63,%XV3URWRFRO SPI ᘏ㒓ण䆂
:KLOH WKH 6' &DUG FKDQQHO LV EDVHG RQ FRPPDQG DQG GDWD ELWVWUHDPV ZKLFK DUH LQLWLDWHG E\ D VWDUW ELW DQG WHUPLQDWHGE\DVWRSELWWKH63,FKDQQHOLVE\WHRULHQWHG(YHU\FRPPDQGRUGDWDEORFNLVEXLOWRIHLJKWELWE\WHV DQGLVE\WHDOLJQHG PXOWLSOHVRIHLJKWFORFNV WRWKH&6VLJQDO
ᔧ SD व䗮䘧ᰃѢੑҸ᭄ԡ⌕ᓣϞᯊˈ䗮ᐌᰃᓔྟѢϔϾĀ䍋ྟԡā㒜ℶѢϔϾĀذℶԡāˈ䖭Ͼ SPI 䗮䘧ᰃ⫼ᄫ㡖ЎऩԡⱘDŽCS ֵোϞⱘ↣ϾੑҸ᭄ഫ䛑ᰃ 8bit ⱘᄫ㡖ᄫ㡖䯳߫˄ህᰃ 8 Ͼᯊ䩳ⱘס᭄˅DŽ
6LPLODUWRWKH6'%XVSURWRFROWKH63,PHVVDJHVDUHEXLOWIURPFRPPDQGUHVSRQVHDQGGDWDEORFNWRNHQV$OO FRPPXQLFDWLRQEHWZHHQKRVWDQGFDUGVLVFRQWUROOHGE\WKHKRVW PDVWHU 7பைடு நூலகம்HKRVWVWDUWVHYHU\EXVWUDQVDFWLRQ E\DVVHUWLQJ WKH&6VLJQDOORZ
SD वਃࡼᯊ໘ SD ᘏ㒓ᓣϟDŽᅗᇚ CS ֵো᳝ᬜ˄Ԣ⬉ᑇ˅ᯊᬊϔϾԡੑҸ˄CMD0˅ᴹ䖯ܹ SPI ᘏ㒓ᓣDŽབᵰ䖭Ͼव䅸Ўᖙ乏⬭ذ SD ᘏ㒓ᓣˈ䙷Мᅗᇚϡᑨㄨ䖭ϾੑҸᑊ㒻㓁ֱᣕ SD ᘏ㒓ᓣDŽབᵰ ৃҹ䕀ᤶࠄ SPI ᘏ㒓ᓣˈ߭ᅗӮ䕀ᤶࠄ SPI ᘏ㒓ᓣᑊ⫼ SPI ᓣⱘ R1 ᑨㄨᴹಲᑨDŽ
䰸њੑҸⱘᑨㄨПˈ↣Ͼ᭄ഫথ䗕ࠄ SD वৢˈݭ᪡ⱘᳳ䯈ᇚ⫼ϔϾ⡍߿ⱘ᭄ᑨㄨᷛ䆄ᴹᑨㄨDŽϔ Ͼ᭄ഫৃҹࠄवⱘܹݭഫ䭓ᑺ˄WRITE_BL_LEN˅ᇣࠄϔϾऩᄫ㡖ⱘᇣ˄⊼ᛣ 1˅DŽ
127(7KHGHIDXOWEORFNOHQJWKLVDVVSHFLILHGLQWKH&6' E\WHV $VHWEORFNOHQJWKRIOHVVWKDQE\WHV ZLOOFDXVHDZULWHHUURU7KHRQO\YDOLGZULWHVHWEORFNOHQJWKLVE\WHV&0'LVQRWPDQGDWRU\LIWKHGHIDXOWLV DFFHSWHG
ੑҸḐᓣ
ੑҸ㉏
䆺㒚ⱘੑҸᦣ䗄
ᑨㄨ
5 ⱘḐᓣ
5EⱘḐᓣ
R2 ⱘḐᓣ
5 ⱘḐᓣ
6' व㾘ḐкѨゴ63, ᘏ㒓ण䆂
䆥㗙⊼˖
ᴀゴ㡖ˈݙ䆺㒚ⱘᦣ䗄њЏࠊ఼ 6' वП䯈ˈ⫼ 63, ᘏ㒓ⳌѦᦵঞ䗮䆃ⱘᷛޚᮍ⊩DŽ ݇Ѣ 63, ᘏ㒓ᢧᠥⱘֵᙃᏆ㒣ϝゴᦣ䗄䖛њDŽ
ᴀゴ㡖ⱘ䞡⚍Ѣᦣ䗄 6' वࡴ⬉ৢⱘԡᎹᚙˈމབԩ䖯ܹ 63, ᓣˈབԩ⫼䕃ӊ᪡ 6' वᎹDŽҹঞ 6' वᰃབԩᬊᑊડᑨЏࠊ఼ⱘੑҸDŽᅗӀП䯈ⱘ䗮䆃ѻ⫳䫭䇃ⱘॳ໘⧚ⱘ Ⳍ݇ࡲ⊩DŽ
2 义 ݅ 27 义
ॳ᭛˖SanDisk Secure Digital Card - Product Manual Version 2.2 ˄Document No. 80-13-00169 September 2004˅ 5 ゴ SPI ᘏ㒓ण䆂 䆥㗙˖䝛䜦DŽ䇋ᇞ䞡៥ⱘࢇࡼˈ࣓ᡘ㺁ׂᬍᴀ᭛Ёⱘݙᆍˈ㢹᭛Ё㗏䆥᳝ϡཹП໘ˈ䇋 Email˖EJWPLKW٤C PGV ໘ᣛℷˈϡ㚰ᛳ▔ʽ
ॳ᭛˖SanDisk Secure Digital Card - Product Manual Version 2.2 ˄Document No. 80-13-00169 September 2004˅ 5 ゴ SPI ᘏ㒓ण䆂 䆥㗙˖䝛䜦DŽ䇋ᇞ䞡៥ⱘࢇࡼˈ࣓ᡘ㺁ׂᬍᴀ᭛Ёⱘݙᆍˈ㢹᭛Ё㗏䆥᳝ϡཹП໘ˈ䇋 Email˖EJWPLKW٤C PGV ໘ᣛℷˈϡ㚰ᛳ▔ʽ
⊼ᛣ 1˖㔎ⳕⱘഫ䭓ᑺᅮН CSD ᆘᄬ఼˄ݙ512 ᄫ㡖˅DŽ䆒ᅮഫⱘⱘ䭓ᑺᇣѢ 512 ᄫ㡖ᇚӮᇐ㟈ܹݭ䫭䇃DŽ ଃϔড়⊩ⱘഫܹݭ䭓ᑺা㛑ᅮЎ 512 ᄫ㡖DŽ㢹ℸ㔎ⳕؐৃফˈ߭᮴䳔Փ⫼ CMD16 ੑҸˈᅗϡᰃᖙ㽕ⱘDŽ
0RGH6HOHFWLRQ ᓣ䗝ᢽ
7KHRQO\ZD\WRUHWXUQWRWKH6'%XVPRGHLVE\SRZHUF\FOLQJWKHFDUG,Q63,PRGHWKH6'&DUGSURWRFROVWDWH PDFKLQHLVQRWREVHUYHG$OOWKH6'&DUGFRPPDQGVVXSSRUWHGLQ63,PRGHDUHDOZD\VDYDLODEOH
ⳌԐ SD ᘏ㒓ᓣˈ䖭Ͼ SPI ֵᙃᰃᓎゟੑҸǃᑨㄨ᭄ഫᷛ䆄ϞⱘDŽ᠔᳝ⱘЏࠊ఼ SD वП䯈ⱘ䗮 䆃䛑ᰃফѢЏࠊ఼DŽ㗠Џࠊ఼ⱘ↣ᘏ㒓໘⧚䛑ᰃҢᢝԢ CS ⱘֵো⬉ᑇᓔྟⱘDŽ
7KHUHVSRQVHEHKDYLRULQ63,%XVPRGHGLIIHUVIURPWKH6'%XVPRGHLQWKHIROORZLQJWKUHHZD\V 7KHVHOHFWHGFDUGDOZD\VUHVSRQGVWRWKHFRPPDQG $QHLJKWRUELWUHVSRQVHVWUXFWXUHLVXVHG :KHQWKHFDUGHQFRXQWHUVDGDWDUHWULHYDOSUREOHPLWZLOOUHVSRQGZLWKDQHUURUUHVSRQVH ZKLFKUHSODFHVWKH H[SHFWHGGDWDEORFN UDWKHUWKDQWLPHRXWDVLQWKH6'%XVPRGH
5.1.8.
ᯊ䩳ࠊ
5.1.9.
䫭䇃ᴵӊ
5.1.9.1.
CRC᮴ᬜᣛҸ
5.1.9.2.
䇏পǃܹݭ᪺䰸ⱘ䍙ᯊᚙᔶ
ᄬ఼ټ䰉߫ߚᏗ
वⱘ䫕ᅮ㾷䫕
⡍⅞⫼䗨ⱘੑҸ䲚
⠜ᴗֱᡸੑҸ䲚
63,ੑҸ䆒㕂
᭄ᑨㄨ
᭄ᷛ䆄
᭄䫭䇃ᷛ䆄
⏙䰸⢊ᗕԡ
वᆘᄬ఼
63,ᘏ㒓ᯊᑣ㾷
5.4.1.
ੑҸ / ᑨㄨ
᭄䇏প
᭄ܹݭ
݊Ё䖬ҟ㒡њ 6' वⱘੑҸ䲚ঞ݊ৃᅲ⦄ⱘࡳ㛑˄63, ᓣϟⱘੑҸ䲚˅DŽࣙᣀ䇏প᭄ǃܹݭ ᭄ǃ᪺䰸᭄ǃֱᡸ᭄ㄝㄝˈ䖭ѯੑҸ᠔Փ⫼ⱘᮍ⊩䰤ࠊᴵӊDŽ
Ўњᮍ֓ᶹ䯙ˈ⍝ঞࠄᴀゴ㡖ݙᆍⱘ݊ᅗゴ㡖ⱘϔ⚍䌘᭭㹿䰘ࡴᴀ᭛ⱘ᳔ৢˈབᵰ≵ࣙᣀᙼ 䳔㽕ⱘֵᙃˈ䇋ᙼএᶹ䯙ॳ᭛ˈ䇶䇶ʽ
⊼ᛣ˖䖭㆛䆥᭛ⱘݙᆍᴹ㞾 6' ѻક ݠ⠜ᴀDŽ6' 㒘㒛ᇍ㞾Ꮕⱘᡔᴃ䌘᭭ᰃֱᆚⱘˈ䰸њ Ҫ㞾Ꮕⱘᅶ᠋ᕜ䲒ᣓࠄDŽֱᡸ㞾Ꮕⱘᡔᴃѻᴗ᮴ৃ८䴲ˈԚ䖭ḋخϡ߽Ѣ 6' वѻકЁݙ ᏖഎϞⱘᑓϢՓ⫼ˈ⬉ⱘݙᄤᎹᏜӀ䖬≵᳝ᆠ㺩ⱘ䞥䪅এ䌁ф 6' ⱘᡔᴃˈԧࠊϞফ䰤জˈ 䇁㿔гϡ䗮ˈᕜᇥ㛑᳝⏴䘧㦋ᕫᬃᣕˈᛇ㞾Ꮕ䆒䅵ⱘϰ㽓Ϟࡴܹᇍ 6' वⱘᬃᣕ䛑ϡᆍᯧDŽ
1 义 ݅ 27 义
ॳ᭛˖SanDisk Secure Digital Card - Product Manual Version 2.2 ˄Document No. 80-13-00169 September 2004˅ 5 ゴ SPI ᘏ㒓ण䆂 䆥㗙˖䝛䜦DŽ䇋ᇞ䞡៥ⱘࢇࡼˈ࣓ᡘ㺁ׂᬍᴀ᭛Ёⱘݙᆍˈ㢹᭛Ё㗏䆥᳝ϡཹП໘ˈ䇋 Email˖EJWPLKW٤C PGV ໘ᣛℷˈϡ㚰ᛳ▔ʽ
䖭Ͼ⠜ᴀᏆ㒣ᕜ䰜ᮻњˈ≵᳝ᆍ䞣 * ҹϞⱘᷛޚDŽབᵰાԡ᳟ট᳝ᮄ⠜ⱘˈݠ䇋থᏗߎᴹˈ ᬃᣕϔϟ⬉ⱘݙᄤ⠅ད㗙ˈઅӀজϡᛇএ᧲ϔϾ㉏Ԑ 6' ⱘ㒘㒛ৠҪᡶ佁ˈাϡ䖛ᛇ䅽㞾Ꮕ 䆒䅵ⱘϰ㽓Ϟ㛑乎߽ഄ⫼Ϟ 6' व㗠ᏆDŽ
䝛䜦 2007.12.2
៥ⱘϾҎぎ䯈˖JVVRYYYKEFGXEQOEP!