nkeverstar

nkeverstar

0个粉丝

9

问答

0

专栏

3

资料

nkeverstar  发布于  2019-09-04 20:21:20
采纳率 0%
9个问答
2031

【u-boot-2010.06】SDIO0 TF卡初始化兼容性问题

 
两种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卡不是专业,求助高手。
我来回答
回答3个
时间排序
认可量排序

nkeverstar

0个粉丝

9

问答

0

专栏

3

资料

nkeverstar 2019-09-06 16:01:32
认可0
本帖最后由 nkeverstar 于 2019-9-7 08:51 编辑

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, 所以我据此判定: SPEC 版本为 1_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

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.

nkeverstar

0个粉丝

9

问答

0

专栏

3

资料

nkeverstar 2019-09-07 08:52:26
认可0
有没有海思的兄弟路过,进来帮忙看下。海思uboot有bug。:)

nkeverstar

0个粉丝

9

问答

0

专栏

3

资料

nkeverstar 2019-09-23 10:19:48
认可0
最新进展:
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 两个文件几处即可。
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区