兩種tf卡,A和B,都是金士頓16G class 10的。
A卡初始化為低速卡
=========================================
EMMC/MMC/SD controller initialization.
CMD41 send:0x40300000
CMD41 response:0xc0ff8000
mmc scr:0x858082
Device is not exit !
MMC/SD Card:
MID: 0x9f
Read Block: 512 Bytes
Write Block: 512 Bytes
Chip Size: 14832M Bytes (High Capacity)
Name: "SD16G"
Chip Type: SD
Version: 1.0
Speed: 25000000Hz
Bus Width: 1bit
Boot Addr: 0 Bytes
In: serial
Out: serial
Err: serial
A卡初始化為低速卡
=========================================
EMMC/MMC/SD controller initialization.
CMD41 send:0x40300000
CMD41 response:0xc0ff8000
mmc scr:0x2058083
Device is not exit !
MMC/SD Card:
MID: 0x9f
Read Block: 512 Bytes
Write Block: 512 Bytes
Chip Size: 14760M Bytes (High Capacity)
Name: "SD16G"
Chip Type: SD
Version: 2.0
Speed: 50000000Hz
Bus Width: 4bit
Boot Addr: 0 Bytes
In: serial
Out: serial
Err: serial
日志列印,A卡初始化例外,是因為sd_send_op_cond (CMD55 + 41) 導致。SD卡不是專業,求助高手。
uj5u.com熱心網友回復:
1. 該tf卡 支持 CMD8,回傳version 2.0;2. 該tf卡 CMD41 設定引數 0x40300000后,后面通過CMD51 讀取的SCR 值為 0x858082;
3. 該卡依然能夠支持CMD6 等指令;
繼續除錯,發現: CMD9 讀取的OSC暫存器值如下:CMD9 response[0]:0x400e0032, response[1]:0x5b590000, response[2]:0x73df7f80, response[3]:0xa4000c7,
也就是說,該卡的SD_SPEC = 0, CCC & bit 10 = 1。也就是說該卡支持CMD6&CMD8。所以我直接對 CMD8 和 SD_SPEC/CCC 進判斷,如果CMD6和CMD8 都支持,直接判定為2.0。 有SD 方面的專家沒,請幫忙看下是否可行。
根據SD specifications:
? Version 1.10 Card Requirements (SD_SPEC is set to 1)
(1) The card shall support CMD6
(2) The card does not support CMD8
(3) User area capacity shall be up to 2GB
? Version 1.10 Card Requirements (SD_SPEC is set to 1)
(1) The card shall support CMD6
(2) The card does not support CMD8
(3) User area capacity shall be up to 2GB
? Version 2.00 Card Requirements (SD_SPEC is set to 2)
(1) The card shall support CMD6
(2) The card shall support CMD8
(3) The card shall support CMD42
(4) In case of SDHC, the card shall support Speed Class
(5) User area capacity shall be up to 32GB.
Therefore, cards that are
compatible with earlier versions of the spec do not support it. The host should check the "SD_SPEC"
field in the SCR register to identify what version of the spec the card complies with before using CMD6.
It is also possible to check support of CMD6 by bit10 of CCC in CSD. It is mandatory for an SD memory
card of Version 1.10 and higher to support CMD6.
uj5u.com熱心網友回復:
例外是怎么個例外法呢uj5u.com熱心網友回復:
2. 該tf卡 CMD41 設定引數 0x40300000后,后面通過CMD51 讀取的SCR 值為 0x858082;然而:
2. 該tf卡 CMD41 設定引數 0x41300000后,后面通過CMD51 讀取的SCR 值為 0x2358043;
uj5u.com熱心網友回復:
2. 該tf卡 CMD41 設定引數 0x40300000后,后面通過CMD51 讀取的SCR 值為 0x858082;
然而:
2. 該tf卡 CMD41 設定引數 0x41300000后,后面通過CMD51 讀取的SCR 值為 0x2358043;
uj5u.com熱心網友回復:
http://www.openedv.com/posts/list/17179.htm你看一下
uj5u.com熱心網友回復:
最新進展:1. 此規格卡為1.8v UHS高速卡,我手上的Hi3518Ev200模塊IO電壓支持1.8v;
2. 參照SD卡協議: SD Specifications Part A2 SD Host Controller Simplified Specification Version 1.00 和 SD Specifications Part 1 Physical Layer Simplified Specification Version 6.00:
- 在CMD41時置S18R 位,tf卡S18A位為1,則在CMD41后,進行CMD11將作業電壓從3.3v切換到1.8v。
- CMD2 等繼續配置。
遺留待確認問題:
此批次tf卡,在S18R/A 未操作,未切換電壓時,為什么暫存器SCR的SD_SPEC位從0x02 變成了 0x00(同樣操作另一批次卡沒有改變)?
需要tf卡方面的專業人士解答。
PS:uboot修改支持1.8v 高速(>10M/s)其實不復雜,難就在于解讀協議。僅需要修改mmc.h, mmc.c 兩個檔案幾處即可。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/92848.html
標籤:驅動開發/核心開發
下一篇:未來智慧城市建設的五大技術
