Android工程之SD卡问题

本文档总结了作者在xxx公司针对Android平台上SD卡出现的识别和读取不稳定问题进行的调试分析。通过分析内核log,发现了Error -123(无卡或卡损坏),Error -84(卡传输错误)和Error -110(卡识别问题)三种情况,并提出了相应的测试方法和解决思路。针对Error -123,建议检查SD卡状态和更换新卡;对于Error -84,建议改进硬件等长处理及信号质量,并延长软件中断去抖动时间;而对于Error -110,建议提升驱动能力或优化坏块检测代码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

/*****************************************************************************
 * Author : Elvins Fu    yeyecheng_93@163.com
 *
 * Info : xxx Inc,(C) 2018-01-11, All rights revseved.
 *
 * Description : This document is summed up by the author for that the company of xxxs  
 * R&D debug SD card on the android platform。
 *
 * This context describes that sd card problem and methods to analysis.
****************************************************************************/


1.在调试SD卡的过程中,遇到了卡识别或者读取不稳定的情况,抓取log进行分析。

情况1:
--------------------------------------------------------------------------------------
[  558.956332] mmc0: Re-init card rc = -123 (retries = 5)
[  559.057076] mmc0: Re-init card rc = -123 (retries = 4)
[  559.174989] mmc0: Re-init card rc = -123 (retries = 3)
[  559.273596] mmc0: Re-init card rc = -123 (retries = 2)
[  559.374437] mmc0: Re-init card rc = -123 (retries = 1)
[  559.478705] mmc_sd_detect(mmc0): Unable to re-detect card (-123)
[  559.489688] mmc0: card 0001 removed

情况2:
----------------------------------------------------------------------------------------------------
[    8.682295] mmcblk0: mmc0:0260 SD    120 MiB 
[    8.684970] mmc0: data txfr (0x00200000) error: -84 after 0 ms
[    8.684977] sdhci: =========== REGISTER DUMP (mmc0)===========
[    8.684987] sdhci: Sys addr: 0x00000000 | Version:  0x00004902
[    8.684997] sdhci: Blk size: 0x00004200 | Blk cnt:  0x00000007
[    8.685010] sdhci: Argument: 0x00000000 | Trn mode: 0x00000033
[    8.685019] sdhci: Present:  0x01f80206 | Host ctl: 0x0000001e
[    8.685028] sdhci: Power:    0x0000000d | Blk gap:  0x00000000
[    8.685037] sdhci: Wake
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值