This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DRA76P: uboot emmc erase fail in hs200 mode

Part Number: DRA76P

Tool/software: Linux

Hi,

I use dra762 chip with ti linux4.4 psdk3.0 software.

UBOOT  emmc erase may fail in HS200 mode,two type error log is below:

can you give me a suggestion? Thanks.

=> mmc erase 0x900000 0x12000

 

MMC erase: dev # 1, block # 9437184, count 73728 ... entry mmc_erase_t

CMD_SEND:35

                ARG                      0x00900000

                MMC_RSP_R1,5,6,7         0x00000900

CMD_SEND:36

                ARG                      0x009003FF

                MMC_RSP_R1,5,6,7         0x00000900

CMD_SEND:38

                ARG                      0x00000000

                MMC_RSP_R1b              0x00000800

CMD_SEND:13

                ARG                      0x00010000

                MMC_RSP_R1,5,6,7         0x80000000

Status Error: 0x80000000

0 blocks erased: ERROR

=> mmc erase 0x900000 0x400

MMC erase: dev # 1, block # 9437184, count 1024 ... entry mmc_erase_t
CMD_SEND:35
ARG 0x00900000
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:36
ARG 0x009003FF
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:38
ARG 0x00000000
MMC_RSP_R1b 0x00000800
CMD_SEND:13
ARG 0x00010000
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
RET -19
CMD_SEND:13
ARG 0x00010000
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
RET -19
CMD_SEND:13
ARG 0x00010000
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
RET -19
CMD_SEND:13
ARG 0x00010000
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
RET -19
CMD_SEND:13
ARG 0x00010000
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
RET -19
CMD_SEND:13
ARG 0x00010000
omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
RET -19
0 blocks erased: ERROR

  • Hi,

    I have forwarded your question to mmc expert.

    Regards,
    Yordan
  • Hi,
    Sorry for the late reply. Thanks for providing the log.

    Can you please share following information
    Do you see the issue only in u-boot or in kernel as well?
    Is this consistent? Have you tried it on more than one board?

    Can you please check with a lower block address and count?

    Can you try "mmc dev 1" and "mmc erase 0x1000 0x400" to check if it works?

    Regards,
    RK
  • Hi, RK


    This issue only occurred in uboot, kernel is ok.
    I have tried 5 boards, the phenomenon is same. probability is about 85%
    "mmc dev 1" and "mmc erase 0x1000 0x400" , it still has same error

    thanks
  • Hi, RK

    Does this issue have progress?
    thanks
  • Hi Zang,
    Can you share the full boot log?
    Can you also print the value of MMCHS_STAT in omap_hsmmc_send_cmd() just before return TIMEOUT;
    I'm also trying to reproduce this on my side on a TI EVM.

    Regards,
    RK
  • Hi, RK

    FULL LOG is:

    [09:04:57:323]=> U-Boot 2016.05-00089-g652f6d2-dirty (Feb 28 2018 - 09:03:54 +0800)
    [09:04:57:354]omap_hsmmc_conf_bus_power
    [09:04:57:354]omap_hsmmc_set_clock-dsor=1e0
    [09:04:57:354]omap_hsmmc_conf_bus_power
    [09:04:57:354]AC12_V1V8_SIGEN-1
    [09:04:57:682]CMD_SEND:0
    [09:04:57:682] ARG 0x00000000
    [09:04:57:682] MMC_RSP_NONE
    [09:04:57:682]CMD_SEND:8
    [09:04:57:682] ARG 0x000001AA
    [09:04:57:682] RET -19
    [09:04:57:682]CMD_SEND:55
    [09:04:57:682] ARG 0x00000000
    [09:04:57:682] RET -19
    [09:04:57:682]CMD_SEND:0
    [09:04:57:682] ARG 0x00000000
    [09:04:57:682] MMC_RSP_NONE
    [09:04:57:682]CMD_SEND:1
    [09:04:57:682] ARG 0x00000000
    [09:04:57:682] MMC_RSP_R3,4 0x00FF8080
    [09:04:57:682]CMD_SEND:1
    [09:04:57:682] ARG 0x40300080
    [09:04:57:682] MMC_RSP_R3,4 0x00FF8080
    [09:04:57:682]CMD_SEND:1
    [09:04:57:682] ARG 0x40300080
    [09:04:57:682] MMC_RSP_R3,4 0xC0FF8080
    [09:04:57:682]CMD_SEND:2
    [09:04:57:682] ARG 0x00000000
    [09:04:57:682] MMC_RSP_R2 0x13014E52
    [09:04:57:697] 0x314A3538
    [09:04:57:697] 0x4510E8A9
    [09:04:57:697] 0x155164AD
    [09:04:57:697]
    [09:04:57:697] DUMPING DATA
    [09:04:57:697] 000 - 13 01 4E 52
    [09:04:57:697] 004 - 31 4A 35 38
    [09:04:57:697] 008 - 45 10 E8 A9
    [09:04:57:697] 012 - 15 51 64 AD
    [09:04:57:697]CMD_SEND:3
    [09:04:57:697] ARG 0x00010000
    [09:04:57:697] MMC_RSP_R1,5,6,7 0x00000500
    [09:04:57:697]omap_hsmmc_set_clock-dsor=4
    [09:04:57:697]CMD_SEND:9
    [09:04:57:697] ARG 0x00010000
    [09:04:57:697] MMC_RSP_R2 0xD07F0132
    [09:04:57:697] 0x0F5903FF
    [09:04:57:697] 0xFFFFFFEF
    [09:04:57:697] 0x864000AD
    [09:04:57:697]
    [09:04:57:697] DUMPING DATA
    [09:04:57:697] 000 - D0 7F 01 32
    [09:04:57:697] 004 - 0F 59 03 FF
    [09:04:57:697] 008 - FF FF FF EF
    [09:04:57:697] 012 - 86 40 00 AD
    [09:04:57:697]CMD_SEND:13
    [09:04:57:697] ARG 0x00010000
    [09:04:57:697] MMC_RSP_R1,5,6,7 0x00000700
    [09:04:57:697]CMD_SEND:7
    [09:04:57:697] ARG 0x00010000
    [09:04:57:697] MMC_RSP_R1,5,6,7 0x00000700
    [09:04:57:697]CMD_SEND:8
    [09:04:57:697] ARG 0x00000000
    [09:04:57:697] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:8
    [09:04:57:713] ARG 0x00000000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:8
    [09:04:57:713] ARG 0x00000000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:6
    [09:04:57:713] ARG 0x03B70200
    [09:04:57:713] MMC_RSP_R1b 0x00000800
    [09:04:57:713]CMD_SEND:13
    [09:04:57:713] ARG 0x00010000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:8
    [09:04:57:713] ARG 0x00000000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:6
    [09:04:57:713] ARG 0x03B90200
    [09:04:57:713] MMC_RSP_R1b 0x00000800
    [09:04:57:713]CMD_SEND:13
    [09:04:57:713] ARG 0x00010000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]omap_hsmmc_set_clock-dsor=1
    [09:04:57:713]AC12_-3 = 30000
    [09:04:57:713]CMD_SEND:21
    [09:04:57:713] ARG 0x00000000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:21
    [09:04:57:713] ARG 0x00000000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:21
    [09:04:57:713] ARG 0x00000000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:21
    [09:04:57:713] ARG 0x00000000
    [09:04:57:713] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:713]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:729] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:729]CMD_SEND:21
    [09:04:57:729] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:744]CMD_SEND:21
    [09:04:57:744] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:744]CMD_SEND:21
    [09:04:57:744] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:744]CMD_SEND:21
    [09:04:57:744] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:744]CMD_SEND:21
    [09:04:57:744] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:744]CMD_SEND:21
    [09:04:57:744] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000000
    [09:04:57:744]CMD_SEND:21
    [09:04:57:744] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:744]CMD_SEND:21
    [09:04:57:744] ARG 0x00000000
    [09:04:57:744] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:744]CMD_SEND:21
    [09:04:57:760] ARG 0x00000000
    [09:04:57:760] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:760]EMMC tuning value=72
    [09:04:57:760]CMD_SEND:16
    [09:04:57:760] ARG 0x00000200
    [09:04:57:760] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:760]CMD_SEND:17
    [09:04:57:760] ARG 0x00000000
    [09:04:57:760] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:760]CMD_SEND:16
    [09:04:57:760] ARG 0x00000200
    [09:04:57:760] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:760]CMD_SEND:18
    [09:04:57:760] ARG 0x00000C00
    [09:04:57:760] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:760]CMD_SEND:12
    [09:04:57:760] ARG 0x00000000
    [09:04:57:775] MMC_RSP_R1b 0x00000900
    [09:04:57:869]Warning: vip board_id(0x3) not correct, default use new method
    [09:04:57:869]Warning: vip ipk_type(0xff) not calibrated, use default IPK_7.
    [09:04:57:869]board_id=0x83, run_mode=1, ipk_type=0x1, car_mode=0xfe
    [09:04:57:869]CMD_SEND:16
    [09:04:57:869] ARG 0x00000200
    [09:04:57:869] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:869]CMD_SEND:17
    [09:04:57:869] ARG 0x0000E000
    [09:04:57:869] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:869]param cmdline:
    [09:04:57:869]booting system A
    [09:04:57:869]CMD_SEND:16
    [09:04:57:869] ARG 0x00000200
    [09:04:57:869] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:869]CMD_SEND:17
    [09:04:57:869] ARG 0x00001000
    [09:04:57:869] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:869]CMD_SEND:16
    [09:04:57:869] ARG 0x00000200
    [09:04:57:869] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:869]CMD_SEND:17
    [09:04:57:869] ARG 0x00005000
    [09:04:57:869] MMC_RSP_R1,5,6,7 0x00000900
    [09:04:57:885] 0stop autoboot by input key
    [09:04:57:885]
    [09:05:02:174]=> mmc erase 0x900000 0x400
    [09:05:02:174]
    [09:05:02:174]MMC erase: dev # 1, block # 9437184, count 1024 ... entry mmc_erase_t
    [09:05:02:174]CMD_SEND:35
    [09:05:02:174] ARG 0x00900000
    [09:05:02:174] MMC_RSP_R1,5,6,7 0x00000900
    [09:05:02:174]CMD_SEND:36
    [09:05:02:174] ARG 0x009003FF
    [09:05:02:174] MMC_RSP_R1,5,6,7 0x00000900
    [09:05:02:174]CMD_SEND:38
    [09:05:02:174] ARG 0x00000000
    [09:05:02:174] MMC_RSP_R1b 0x00000800
    [09:05:02:174]CMD_SEND:13
    [09:05:02:174] ARG 0x00010000
    [09:05:02:190] MMC_RSP_R1,5,6,7 0x80000000
    [09:05:02:190]Status Error: 0x80000000
    [09:05:02:206]0 blocks erased: ERROR
    [09:05:03:766]=> mmc erase 0x900000 0x400
    [09:05:03:766]
    [09:05:03:797]MMC erase: dev # 1, block # 9437184, count 1024 ... entry mmc_erase_t
    [09:05:03:797]CMD_SEND:35
    [09:05:03:797] ARG 0x00900000
    [09:05:03:797] MMC_RSP_R1,5,6,7 0x00000900
    [09:05:03:797]CMD_SEND:36
    [09:05:03:797] ARG 0x009003FF
    [09:05:03:797] MMC_RSP_R1,5,6,7 0x00000900
    [09:05:03:797]CMD_SEND:38
    [09:05:03:797] ARG 0x00000000
    [09:05:03:797] MMC_RSP_R1b 0x00000800
    [09:05:03:797]CMD_SEND:13
    [09:05:03:797] ARG 0x00010000
    [09:05:03:797] MMC_RSP_R1,5,6,7 0x80000000
    [09:05:03:812]Status Error: 0x80000000
    [09:05:03:812]0 blocks erased: ERROR
    [09:05:18:944]=> mmc erase 0x900000 0x400
    [09:05:18:959]MMC erase: dev # 1, block # 9437184, count 1024 ... entry mmc_erase_t
    [09:05:18:959]CMD_SEND:35
    [09:05:18:959] ARG 0x00900000
    [09:05:18:959] MMC_RSP_R1,5,6,7 0x00000900
    [09:05:18:959]CMD_SEND:36
    [09:05:18:959] ARG 0x009003FF
    [09:05:18:959] MMC_RSP_R1,5,6,7 0x00000900
    [09:05:18:959]CMD_SEND:38
    [09:05:18:959] ARG 0x00000000
    [09:05:18:959] MMC_RSP_R1b 0x00000800
    [09:05:18:959]CMD_SEND:13
    [09:05:18:975] ARG 0x00010000
    [09:05:19:973]omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    [09:05:19:973]0x480b4230MMCHS_STAT=0x2
    [09:05:19:973] RET -19
    [09:05:19:973]CMD_SEND:13
    [09:05:19:989] ARG 0x00010000
    [09:05:20:987]omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    [09:05:20:987]0x480b4230MMCHS_STAT=0x2
    [09:05:20:987] RET -19
    [09:05:20:987]CMD_SEND:13
    [09:05:20:987] ARG 0x00010000
    [09:05:22:001]omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    [09:05:22:001]0x480b4230MMCHS_STAT=0x2
    [09:05:22:001] RET -19
    [09:05:22:001]CMD_SEND:13
    [09:05:22:001] ARG 0x00010000
    [09:05:23:015]omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    [09:05:23:015]0x480b4230MMCHS_STAT=0x2
    [09:05:23:015] RET -19
    [09:05:23:015]CMD_SEND:13
    [09:05:23:015] ARG 0x00010000
    [09:05:24:029]omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    [09:05:24:029]0x480b4230MMCHS_STAT=0x2
    [09:05:24:029] RET -19
    [09:05:24:029]CMD_SEND:13
    [09:05:24:029] ARG 0x00010000
    [09:05:25:027]omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear
    [09:05:25:027]0x480b4230MMCHS_STAT=0x2
    [09:05:25:027] RET -19
    [09:05:25:043]0 blocks erased: ERROR
  • Hi,

    Thanks for the logs.

    [09:05:03:797] MMC_RSP_R1,5,6,7 0x80000000

    [09:05:03:812]Status Error: 0x80000000

    [09:05:03:812]0 blocks erased: ERROR

     

    Above status response shows that there was an ADDRESS_OUT_OF_RANGE [31] error happened.

    What's the card capacity?

    Did you try with a small offset? like "mmc erase 0x1000 0x400"?

    Regards,

    RK

  • Hi, RK

    our emmc is 64G byte

    0x900000 block is not out of arrange.

    mmc erase 0x1000 0x400 also return same error

    Thanks
  • Hi, RK

    can you try use hs200 mode in uboot on evm?
    uboot2016.05 psdk3.0
    thanks
  • Hi Xiaofeng,

    I was able to reproduce the issue after trying on couple of boards.

    The issue seems to be not consistent. Sometimes erase returns success and sometimes it fails with same command and arguments. You can see this behaviour in attached log.

    As you have also observed there are two types of errors reported

    1. The device status error (Status Error: 0xFDF21228 )

    2. Timeout waiting for Stat clear ( omap_hsmmc_send_cmd: timedout waiting for STAT (2) to clear │·· RET -19 )

    /cfs-file/__key/communityserver-discussions-components-files/791/6685.mmc_5F00_erase_5F00_log2.txt

    I'm working on the root cause. I will provide an update after debugging further.

    Regards,
    RK

  • Hi Xiaofeng,
    As per my analysis the interrupt bit for Transfer complete MMCHS_STAT[1]TC is not being cleared even after writing 0x1 to the bit and waiting for 20 millisecond in some cases (not consistent).
    I'm following up with TI HW team on this issue. I will provide an update when I have new information.

    Regards,
    RK