USDHC Failure - No Interrupt on CMD25

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USDHC Failure - No Interrupt on CMD25

2,143 Views
PaulDeMetrotion
Senior Contributor I

A customer is using our i.MX6-based SBC. His application runs on an SD device connected to the USHDC1 interface. The application will run for hours without a problem and then miss an interrupt.

As shown on the trace below, the missed interrupt is a Transfer Complete interrupt in response to a CMD25 (WRITE_MULTIPLE_BLOCK) MMC command. The trace also includes two successful command sequences for reference. There also appears to be a stray interrupt 0x00000001 at the end of the trace. Don't know where this came from.

Has anybody seen something similar? It appears that it could be an SD issue since that device should return the interrupt at completion.

<mmc1: starting CMD23 arg 00000008 flags 00000015>
mmc1: starting CMD25 arg 0074c9d0 flags 000000b5
mmc1: blksz 512 blocks 8 flags 00000100 tsac 3000 ms nsac 0
mmc1: CMD12 arg 00000000 flags 0000049d
sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
*** mmc1 got interrupt: 0x00000001
sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000002
*** mmc1 got interrupt: 0x00000002
mmc1: req done <CMD23>: 0: 00000000 00000000 00000000 00000000
mmc1: req done (CMD25): 0: 00000900 00000000 00000000 00000000
mmc1: 4096 bytes transferred: 0
mmc1: (CMD12): 0: 00000000 00000000 00000000 00000000
mmc1: starting CMD13 arg 00070000 flags 00000195
sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
*** mmc1 got interrupt: 0x00000001
mmc1: req done (CMD13): 0: 00000900 00000000 00000000 00000000

sdhci-esdhc-imx 2194000.usdhc: desired SD clock: 50000000, actual: 49500000
sdhci-esdhc-imx 2194000.usdhc: change pinctrl state for uhs 2
sdhci-esdhc-imx 2194000.usdhc: desired SD clock: 50000000, actual: 49500000

<mmc1: starting CMD23 arg 00000018 flags 00000015>
mmc1: starting CMD25 arg 00796038 flags 000000b5
mmc1: blksz 512 blocks 24 flags 00000100 tsac 3000 ms nsac 0
mmc1: CMD12 arg 00000000 flags 0000049d
sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
*** mmc1 got interrupt: 0x00000001
sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000002
*** mmc1 got interrupt: 0x00000002
mmc1: req done <CMD23>: 0: 00000000 00000000 00000000 00000000
mmc1: req done (CMD25): 0: 00000900 00000000 00000000 00000000
mmc1: 12288 bytes transferred: 0
mmc1: (CMD12): 0: 00000000 00000000 00000000 00000000
mmc1: starting CMD13 arg 00070000 flags 00000195
sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
*** mmc1 got interrupt: 0x00000001
mmc1: req done (CMD13): 0: 00000900 00000000 00000000 00000000

<mmc1: starting CMD23 arg 00000018 flags 00000015>
mmc1: starting CMD25 arg 00797ff8 flags 000000b5
mmc1: blksz 512 blocks 24 flags 00000100 tsac 3000 ms nsac 0
mmc1: CMD12 arg 00000000 flags 0000049d
sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
*** mmc1 got interrupt: 0x00000001

mmc1: Timeout waiting for hardware interrupt.  <-- should be an interrupt: 0x00000002 here!

sdhci: =========== REGISTER DUMP (mmc1)===========
sdhci: Sys addr: 0x1193e400 | Version: 0x00000002
sdhci: Blk size: 0x00000200 | Blk cnt: 0x0000000f
sdhci: Argument: 0x00797ff8 | Trn mode: 0x0000002b
sdhci: Present: 0x01e8810e | Host ctl: 0x00000023
sdhci: Power: 0x00000002 | Blk gap: 0x00000080
sdhci: Wake-up: 0x00000008 | Clock: 0x0000003f
sdhci: Timeout: 0x0000000f | Int stat: 0x00000000
sdhci: Int enab: 0x107f100b | Sig enab: 0x107f100b
sdhci: AC12 err: 0x00000000 | Slot int: 0x00000003
sdhci: Caps: 0x07eb0000 | Caps_1: 0x0000a007
sdhci: Cmd: 0x0000193a | Max curr: 0x00ffffff
sdhci: Host ctl2: 0x00000000
sdhci: ADMA Err: 0x00000003 | ADMA Ptr: 0x6a07700c
sdhci: ===========================================

sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
*** mmc1 got interrupt: 0x00000001

sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00100000
*** mmc1 got interrupt: 0x00100000
mmc1: Got data interrupt 0x00100000 even though no data operation was in progress.

0 Kudos
2 Replies

1,740 Views
PaulDeMetrotion
Senior Contributor I

Thanks for the suggestions. We will dig into these right away. I also found the following in the SDIO Card Interrupt section of the MX6Q reference manual. Could this be the reason we miss an interrupt on the SD card or is it specific to SDIO only?

ref_manual.png

0 Kudos

1,740 Views
igorpadykov
NXP Employee
NXP Employee

Hi Paul

issue may be caused by signal integrity issues, one can try solutions provided on

eMMC 8GB to 4GB - crash on linux (yocto) boot 

Also may be recommended to recheck memory:

i.MX6/7 DDR Stress Test Tool V3.00 

For narrowing down issue one can try to reproduce issue on NXP reference board

with Demo Images from i.MX Software|NXP 

Also usdhc CMD25 testing can be done with baremetal SDK found on link SMP Enable in IMX6 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos