cancel
Showing results for 
Search instead for 
Did you mean: 

How to boot on emmc with specific emmc pin out ?

ABous.1
Associate II

Hello,

We have a custom board with STM32MP157F silicon rev Z with emmc 24AA64T-I/OT . We are able to flash out OS with cubePorgrammer but we are not able to boot on emmc after flashing.

According to :

https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview#Boot_from_SD_card

https://wiki.stmicroelectronics.cn/stm32mpu/wiki/How_to_update_OTP_with_U-Boot

and

RM0436 part 4 we programmed OTP registers with the following parameters :

  • CFG3 = 0x00000007 ( emmc_if_id=2 qspi_not_default_af=1 (config by mistake) )
  • CFG5=0x10953191
  • CFG6=0x2f952e95
  • CFG7=0x24952395

where :

-0x3191 == sdmmc2_ck PC1 AF9 no pull medium speed

-0x1095==sdmmc2_cmd PA0 AF9 pull up high speed

-0x2e95==sdmmc2_D0 PB14 AF9 pull up high speed

-0x2f95==sdmmc2_D1 PB15 AF9 pull up high speed

-0x2395==sdmmc2_D2 PB3 AF9 pull up high speed

-0x2495==sdmmc2_D3 PB4 AF9 pull up high speed

When we set the boot pins according to emmc boot no thing append. We have no log on serial port and the MP1 entrer in usb/uart dfu mode.

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi,

Your value for CFG3 (0x00000007) is wrong, you sets emmc_if_id=3 which is not allowed.

This could explain the behavior (in case of bad setting, BootROM immediately fallback to DFU).

You might look at BootRom trace using the method defined here: https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_trace_analyzer

Few comments:

So, in your case, recommended OTP values are:

  • WORD3 : 0x00000004
    • emmc_if_id =2 => eMMC boot from SDMMC2 (uses non default AFmux defined in OTP)
  • WORD5 : 0x10943191
    • PC1 - AF9 (SDMMC2_CK) - No Pull - Medium Speed
    • PA0 - AF9 (SDMMC2_CMD) - Pull Up - Medium Speed
  • WORD6 : 0x00002E94
    • PB14 - AF9 (SDMMC2_D0) - Pull Up - Medium Speed
    • second part not use
  • WORD7 : 0x00000000
    • not used

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
PatrickF
ST Employee

Hi,

Your value for CFG3 (0x00000007) is wrong, you sets emmc_if_id=3 which is not allowed.

This could explain the behavior (in case of bad setting, BootROM immediately fallback to DFU).

You might look at BootRom trace using the method defined here: https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_trace_analyzer

Few comments:

So, in your case, recommended OTP values are:

  • WORD3 : 0x00000004
    • emmc_if_id =2 => eMMC boot from SDMMC2 (uses non default AFmux defined in OTP)
  • WORD5 : 0x10943191
    • PC1 - AF9 (SDMMC2_CK) - No Pull - Medium Speed
    • PA0 - AF9 (SDMMC2_CMD) - Pull Up - Medium Speed
  • WORD6 : 0x00002E94
    • PB14 - AF9 (SDMMC2_D0) - Pull Up - Medium Speed
    • second part not use
  • WORD7 : 0x00000000
    • not used

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
ABous.1
Associate II

I try your settings with an other custom board and I have the same issue.

< @ 00007507 | [INFO] - BOOTCORE_BootRomMaskVer ( 0x00000000 ) >
< @ 00008803 | [INFO] - BOOTCORE_BootRomVer ( 0x00000102 ) >
< @ 00009979 | [INFO] - BOOTCORE_FreezeIWDG12Clocks >
< @ 00011338 | [INFO] - BOOTCORE_HwResetPOR >
< @ 00022855 | [INFO] - BOOTCORE_ChipModeSecOpen >
< @ 00025237 | [INFO] - BOOTCORE_LogicalResetSystem >
< @ 00026976 | [INFO] - BOOTCORE_BootActionColdBootProcess >
< @ 00085684 | [INFO] - BOOTCORE_BootCfgOtpWordValue ( 0x00000006, 0x00000000 ) >
< @ 00087138 | [INFO] - BOOTCORE_BootPinsFirstSelEmmc >
< @ 00088202 | [INFO] - BOOTCORE_OtpPrimarySrcForceNothing >
< @ 00089231 | [INFO] - BOOTCORE_OtpSecondarySrcForceNothing >
< @ 00090340 | [INFO] - BOOTCORE_OtpBootSrcDisableMaskVal ( 0x00000000 ) >
< @ 00091479 | [INFO] - BOOTCORE_OtpBootUartInstanceDisableMaskVal ( 0x00000000 ) >
< @ 00092917 | [INFO] - BOOTCORE_eMmcUseSingle128KBytesBootPartition ( 0x00000000 ) >
< @ 00095182 | [INFO] - BOOTCORE_BootCfgAfmuxOtpWord1Value ( 0x10953191 ) >
< @ 00096546 | [INFO] - BOOTCORE_BootCfgAfmuxOtpWord2Value ( 0x00002E95 ) >
< @ 00097953 | [INFO] - BOOTCORE_BootCfgAfmuxOtpWord3Value ( 0x00000000 ) >
< @ 00099480 | [INFO] - BOOTCORE_BootCfgHseValue ( 0x00000000 ) >
< @ 00102510 | [INFO] - BOOTCORE_EnabledSrcMaskVal ( 0x00000648 ) >
< @ 00103857 | [INFO] - BOOTCORE_BootModeCOLDBOOT >
< @ 00640286 | [INFO] - BOOTCORE_StartupWaitTime ( 0x00002700 ) >
< @ 00641855 | [INFO] - BOOTCORE_NoCpuPllOtpBitValue ( 0x00000000 ) >
< @ 00644087 | [INFO] - BOOTCORE_Pll12StartNotDisabledByOtpBit >
< @ 00646161 | [INFO] - BOOTCORE_Pll1Started >
< @ 00650760 | [INFO] - BOOTCORE_Pll1Locked >
< @ 00652132 | [INFO] - BOOTCORE_Pll2Started >
< @ 00656688 | [INFO] - BOOTCORE_Pll2Locked >
< @ 00658281 | [INFO] - BOOTCORE_CkMpuSsSwitchedOnPll1 >
< @ 00659763 | [INFO] - BOOTCORE_CkAxiSsSwitchedOnPll2 >
< @ 00660343 | [INFO] - BOOTCORE_Pll12StartReqStatusPllStarted >
< @ 03863836 | [ERR ] - MMC_AcknowledgeTimeout >
< @ 03878301 | [INFO] - BOOTCORE_HseDigBypassDetected >
< @ 03883751 | [INFO] - BOOTCORE_HseFrequencyDetected ( 0x00000018 ) >
< @ 03884140 | [INFO] - USB_Init >
< @ 03954751 | [INFO] - BOOTCORE_PllUsbLocked >
< @ 07546143 | [INFO] - UART_PeripheralSerialBootLoopStart >

This low level boot issue has been resolved using direct support thru ST local FAE.

Was mostly due to OTP values mistake and missing eMMC EXT_CSD[179] settings (flashing issue).

Further issues, not related to low level boot will deserve a different post (if not followed by direct ST support).

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.