天嵌 ARM开发社区

 找回密码
 注册
查看: 7577|回复: 6

SD卡调试出现错误

[复制链接]
xw_superstar 发表于 2012-8-8 13:13:16 | 显示全部楼层 |阅读模式
SD卡调试出现错误

我们用的是S3C6410,做了一个底板,跟开发板硬件上的区别在于没有把写保护SD0_nWP连接到XhiDATA16/EINT21/GPL13脚上,就是说SD0_nWP是悬空的。
现在调试SD卡出现以下打印信息,不知道是不是这个写保护信号脚SD0_nWP没接的原因还是别的原因,很急,请高手指点,谢谢
mmc0: Timeout waiting for hardware interrupt.
mmc0: mmc_rescan_try_freq: trying to init card at 300000 Hz
*************************************************
mmc0: error -110 whilst initialising SD card
mmc0: Timeout waiting for hardware interrupt.
mmc0: mmc_rescan_try_freq: trying to init card at 200000 Hz
*************************************************
mmc0: error -110 whilst initialising SD card
mmc0: Timeout waiting for hardware interrupt.
mmc0: mmc_rescan_try_freq: trying to init card at 100000 Hz
*************************************************
mmc0: error -110 whilst initialising SD card
mmc0: Timeout waiting for hardware interrupt.
mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 200000 Hz
mmc1: mmc_rescan_try_freq: trying to init card at 100000 Hz
embedsky_lhh 发表于 2012-8-8 18:08:07 | 显示全部楼层
写保护没连接的话挂载的时候应该是只读的,与这个没关系,这个脸通信都有问题,估计时钟线没走好,有干扰
 楼主| xw_superstar 发表于 2012-8-9 14:48:18 | 显示全部楼层
embedsky_lhh 发表于 2012-8-8 18:08
写保护没连接的话挂载的时候应该是只读的,与这个没关系,这个脸通信都有问题,估计时钟线没走好,有干扰

您好,我测了一下clk信号,信号蛮好的,我试了一下把上拉电阻改小,插入SD卡(256MB)出现以下打印信息:
mmc0: new high speed SD card at address b368
mmcblk0: mmc0:b368 SD    244 MiB
mmcblk0: retrying using single block read
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 0
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 1
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 2
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 3
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 4
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 5
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 6
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 7
Buffer I/O error on device mmcblk0, logical block 0
mmcblk0: retrying using single block read
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 0
mmc0: ADMA error
mmc0: Got data interrupt 0x00400000 even though no data operation was in progress.
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
mmcblk0: error -5 transferring data, sector 1, nr 7, card status 0x0
end_request: I/O error, dev mmcblk0, sector 1
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 2
mmc0: Got data interrupt 0x02000000 even though no data operation was in progress.
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 3
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 4
mmc0: Got data interrupt 0x02000000 even though no data operation was in progress.
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 5
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
end_request: I/O error, dev mmcblk0, sector 6
mmc0: ADMA error
mmc0: Got data interrupt 0x00400000 even though no data operation was in progress.
mmcblk0: error -110 sending status command
mmcblk0: error -110 sending read/write command, response 0x0, card status 0x0
mmcblk0: error -5 transferring data, sector 7, nr 1, card status 0x0
end_request: I/O error, dev mmcblk0, sector 7
Buffer I/O error on device mmcblk0, logical block 0
mmcblk0: unable to read partition table

拔出SD卡
mmc0: card b368 removed

上面还有错误,不知道是什么原因,请指点
embedsky_lhh 发表于 2012-8-10 09:18:12 | 显示全部楼层
这个应该是走线的问题,你在时钟线上和地直接接个电容试试
 楼主| xw_superstar 发表于 2012-8-10 17:26:14 | 显示全部楼层
本帖最后由 xw_superstar 于 2012-8-10 17:27 编辑
embedsky_lhh 发表于 2012-8-10 09:18
这个应该是走线的问题,你在时钟线上和地直接接个电容试试


现在我们测得SD卡CLK信号频率是33MHz,高电平才2.0V左右,没有3.3V左右,插拔SD卡时,有时候检测正确,但大部分时间会出现错误。查看了一下S3C6410的datasheet,SD卡的CLK信号和SD数据DO~D3的供电电压是不是由S3C6410设定的datasheet里面有一个Power Control register寄存器,可以设定SD总线的供电电压。是不是这个原因,程序里面检测的SD卡供电状态时候,误认为只有3V或者更低的电压,所以6410就根据这个值,把SD卡总线电压设置为1.8V或者3V,使得SD卡输出的CLK信号电平偏低这么多?请指教,谢谢
embedsky_lhh 发表于 2012-8-12 00:52:01 | 显示全部楼层
加个上拉试试
 楼主| xw_superstar 发表于 2012-8-12 09:12:52 | 显示全部楼层
embedsky_lhh 发表于 2012-8-12 00:52
加个上拉试试

都有上拉电阻的,而且阻值变小,效果不大
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-10-2 03:08 , Processed in 1.023372 second(s), 18 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表