2019-04-24 09:38 AM
Hi everyone,
The stm32mp1 use SDMMC2 as default emmc controller. Now, I need use SDMMC1 to connect emmc flash. And I saw the OTP need changed. Bud I am confuse about IOs of SDMMC1. Does it also need setting some OTP bits to pinmux CK, CMD, D0?
This picture show need change bit to chose SDMMC1.
This picture is confused me. When I use SDMMC1, is it need configure CMD, CK,D0 to default pinmux on SDMMC1? If it is needed, where to configure those?
Solved! Go to Solution.
2019-04-25 11:40 PM
Hello,
You have already find most information, just missing to set in OTP5-6 the definition of new pins to be used during boot.
In order to use eMMC on SDMMC1 and using (for example) SDMMC1_CK = PC12, SDMMC1_D0 = PC8, SDMMC1_CMD = PD2 pins (only 3 pins used during BootROM first stage of boot), you need to program the following:
You should also update devicetree and rebuild all subsequent level of boot to use SDMMC1 interface and pins (including all eMMC data lines pins , as later stages use 8-bit data mode).
Currently only Toshiba eMMC references presents on STM32MP157x_EV1 boards (THGBMNG5D1LBAIL or THGBMDG5D1LBAIL) are validated with STM32MP1 series.
Some links to complete this post:
wiki/STM32MP15_ROM_code_overview#Boot_from_e-E2-80-A2MMC-E2-84-A2
wiki/How_to_cross-compile_with_the_Developer_Package
2019-04-25 11:40 PM
Hello,
You have already find most information, just missing to set in OTP5-6 the definition of new pins to be used during boot.
In order to use eMMC on SDMMC1 and using (for example) SDMMC1_CK = PC12, SDMMC1_D0 = PC8, SDMMC1_CMD = PD2 pins (only 3 pins used during BootROM first stage of boot), you need to program the following:
You should also update devicetree and rebuild all subsequent level of boot to use SDMMC1 interface and pins (including all eMMC data lines pins , as later stages use 8-bit data mode).
Currently only Toshiba eMMC references presents on STM32MP157x_EV1 boards (THGBMNG5D1LBAIL or THGBMDG5D1LBAIL) are validated with STM32MP1 series.
Some links to complete this post:
wiki/STM32MP15_ROM_code_overview#Boot_from_e-E2-80-A2MMC-E2-84-A2
wiki/How_to_cross-compile_with_the_Developer_Package
2020-07-17 06:12 AM
hi, i have some issue with that answer .
i updated the OTP3 , 5, 6 like PAtrik said and my emmc connected to those pins. and i managed to write via stm32Programmer and flash layouts mmc to this emmc so it working but the boot didn't start
what i missed?
2020-07-17 06:26 AM
Hello,
Which eMMC reference are you using ?
Which silicon revision are you using ? See datasheet (e.g. DS12505) to see where the revision is located on package marking.
There is a know bug on STM32MP15x silicon Rev.B which avoid some(most) eMMC reference to boot correctly, this is solved in Rev.Z silicon revision.
Meanwhile, as an indication, Toshiba THGBMNG5D1LBAIL, THGBMDG5D1LBAIL, and Kingston EMMC04G-M627-X03U have shown to operate correctly on the STM32MP157C-EV1 board which are using Rev.B silicon.
Rev.Z is in production from some months (there could still be some Rev.B in stock at distributors, so you should ask before placing order).
See ES0438: STM32MP151x/3x/7x device limitations
2020-07-17 06:32 AM
KLMBG2JENB emmc i using stm32mp153aaa3 rev B
may be i need to change the pins to no pull ?
2020-07-17 06:49 AM
Hello,
As stated above, I fear the issue come from the Samsung eMMC together with the STM32MP1 silicon Rev.B .
There is no workaround except changing the eMMC to a Toshiba or Kingston (recommended reference stated above, but other might work) or much better to latest STM32MP1 silicon Rev.Z.
Changing pin settings will not help, it is a matter of timing response from eMMC.
As an ugly workaround (just to confirm it could fly), issuing a manual NRST_CORE low pulse might work.
This will restart the boot process (without any power cycle nor eMMC reset) and could allow to boot correctly as the eMMC memory might respond faster the second time the boot sector content is requested.
I understand it could be a frustrating issue.
2020-07-17 06:56 AM
tnx. i will replace the emmc it would be faster.
2020-07-17 07:03 AM
can i boot the emmc from UBOOT that i uploaded through usb dfu?
2020-07-17 08:12 AM
I think so, but as I'm more on HW side, I cannot help much on that. There is some related command available in uBoot.
Alternatively, you could do first boot phases from another Flash (Serial-NOR, SD-Card) which only contain TF-A and uBoot. This is supported by CubeProgrammer (there is examples of .tsv files for NOR+SDCARD which might help).
2020-07-20 07:02 AM
hey patric we switched the emmc to emmc that in the EV board and the board resets itself all the time. do you have suggestions ?