No response from the MMC (eSDHC p2020)

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

No response from the MMC (eSDHC p2020)

840 Views
notshure
Contributor IV

Hello everyone,
I'm trying to access an MMC with a p2020 (eSDHC) at bare metal level (C code). Thanks to your help I was able to understand how to move and understand how to write C code. I wrote a boot sequence (always following the guide dictated by the p2020 datasheet) to start the MMC, but it doesn't respond.

The startup sequence includes the following steps:

  • Send 80 clock ticks for card to power up
  • Init controller clocks (400 KHz)
  • Clear all statuses
  • Set data width to default 
  • Set data timeout to maximum value
  • Reset the card (SEND COMMAND 0 = GO_IDLE_STATE)

 

The main problem is that I do not receive any R1 = 0x01 as a response from the MMC once it receives the CMD0.

The ZERO command is generated correctly since it is visible with the oscilloscope.
The 80 clock pulses are also generated correctly since they are also visible with the oscilloscope.

I don't understand if I'm wrong in the boot sequence or whatever.

I am attaching the .c and .h files

0 Kudos
Reply
1 Reply

833 Views
ufedor
NXP Employee
NXP Employee

There is no eSDHC bare-board example code from NXP, so there could be several approaches:

1) doublecheck the processor connection schematics

2) refer to the U-Boot mmc driver source code (u-boot/drivers/mmc/fsl_esdhc.c)

3) use a logic analyzer to inspect the SDHC interface activity

4) use NXP Professional Engineering Services:

https://www.nxp.com/support/support/nxp-engineering-services:SW-SUPPORT

 

 

0 Kudos
Reply