eMMC initialization on Zynq7020

Hi everybody,

I am trying to use FAT on zynq7020. I am currently trying to learn how to initialize the MMC card. I have two questions:

  1. In xsdps.c file line 2947 to read CID, XSdPs_ReadReg16 function is used 4 times to read 128 bit register. I think it should be replaced with XSdPs_ReadReg to read 32 bit registers. Is there a point I don’t understand or miss?
  2. Relative addreses of eMMC is set 0x12340000. Is there any specific reason not to set 0x0000000?

Have a good day.

Please link to the lines you are referring to in github. For example, this link is to line 568 of the head revision of the kernel’s task.c file. FreeRTOS-Kernel/tasks.c at main · FreeRTOS/FreeRTOS-Kernel · GitHub

Thank you for information. The second question is about the code just after the code snippet below.

Looks like a Xilinx generated file and I’m going to guess it gets set to be correct for the hardware.

I think it should be replaced with XSdPs_ReadReg to read 32 bit registers

If you think so, have a try and read the registers with 32-bit access.

how to initialize the MMC card

I used FreeRTOS+FAT very often with SD-cards, but I never had an MMC card, so I can not try it.

Xilinx does have a forum where questions can be asked.