/*****************************************************************************
* 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)
* 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
情况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

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

被折叠的 条评论
为什么被折叠?



