Skip to main content
Senior
April 29, 2025
Solved

EMMC not being detected in DFU mode

  • April 29, 2025
  • 12 replies
  • 3492 views

Hi,

We have a custom carrier board based on STM32MP157DAC. We have built a custom yocto image.

  • Yocto Version: Mickledore
  • Machine: stm32mp15-disco
  • SoM: STM32MP157DAC
  • Distro: openstlinux-weston
  • Linux Kernel: 6.1.82-stm32mp-r2-r0

I was able to get a EMMC binaries by adding below line in my local.conf
STM32MP_DT_FILES_EMMC += "stm32mp157f-dk2"

I have also attached the modified flashlayout for EMMC.

I came across a post here saying if default pins are changes we will have to do otp for emmc to be detected.

below are the pins we are using:-

PB14SDMMC2_D0
PB15SDMMC2_D1
PB3SDMMC2_D2
PB4SDMMC2_D3
PA8SDMMC2_D4
PA15SDMMC2_D5
PC6SDMMC2_D6
PC7SDMMC2_D7
PE3SDMMC2_CLK
PG6SDMMC2_CMD


Do we need to do otp for these pins or what can be done for EMMC to be detected during dfu(0,0,0) mode for flashing to emmc.

below is my flash layout file for emmc:-

#OptIdNameTypeIPOffsetBinary
-0x01fsbl-bootBinarynone0x0arm-trusted-firmware/tf-a-stm32mp157f-dk2-usb.stm32
-0x03fip-bootFIPnone0x0fip/fip-stm32mp157f-dk2-optee-emmc.bin
P0x04fsbl1Binarymmc1boot1arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee-emmc.stm32
P0x05fsbl2Binarymmc1boot2arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee-emmc.stm32
P0x06metadata1FWU_MDATAmmc10x00084000arm-trusted-firmware/metadata.bin
P0x07metadata2FWU_MDATAmmc10x00100000arm-trusted-firmware/metadata.bin
P0x08fip-aFIPmmc10x00180000fip/fip-stm32mp157f-dk2-optee-emmc.bin
PED0x09fip-bFIPmmc10x00580000none
PED0x0Au-boot-envENVmmc10x00980000none
P0x10bootfsSystemmmc10x00A00000st-image-bootfs-openstlinux-weston-stm32mp15-disco.ext4
P0x11vendorfsFileSystemmmc10x04A00000st-image-vendorfs-openstlinux-weston-stm32mp15-disco.ext4
P0x12rootfsFileSystemmmc10x05A00000st-image-qt-openstlinux-weston-stm32mp15-disco.ext4



Thanks.

 

Best answer by adnan_pasha

Hi,

I was able to resolve this issue and the device to boot using EMMC By changing the MMC_DEFAULT_MAX_RETRIES in TFA_source/driver/mmc/mmc.c file from 5 to 10.

Below is the link to my other post where I was able to resolve it.

https://community.st.com/t5/stm32-mpus-embedded-software-and/not-able-to-boot-from-emmc-on-stm32mp157dac-panic-at-pc/m-p/799044#M4744


Thanks.

12 replies

Senior
May 2, 2025

Hi @PatrickF 

We are using EMMC04G-MT32-FBGA153 EMMC .

I had seen in few posts that certain EMMC's are not supported.
I wanted to know if our EMMC device is compatible with the STM32MP157DAC som.

Thanks

adnan_pashaAuthorBest answer
Senior
May 5, 2025

Hi,

I was able to resolve this issue and the device to boot using EMMC By changing the MMC_DEFAULT_MAX_RETRIES in TFA_source/driver/mmc/mmc.c file from 5 to 10.

Below is the link to my other post where I was able to resolve it.

https://community.st.com/t5/stm32-mpus-embedded-software-and/not-able-to-boot-from-emmc-on-stm32mp157dac-panic-at-pc/m-p/799044#M4744


Thanks.