2025-05-29 8:40 AM
Dear community,
we use STM32MP1 SoC in some of our projects. Normally, we use eMMC card, so we use just two DIP switch positions: 000 (for uploading images into eMMC) and 010 (for booting from eMMC). We utilize SD card after booting from eMMC for storing our data.
Once I prepared bootable SD card and tried booting from SD using DIP switch 101 position. And nothing happened.
As long as we setup pins for SD card (in CubeMX, for example) and build images, Linux, U-boot and DTB become updated, so LInux and U-boot know, what actual pinout of SD card is. I wonder, at the first boot stage while BootROM selects media to proceed booting: eMMC, SD, USB (according to DIP switch position) how does it know actual SD (or eMMC) card pinout ?
I miss something important, please, guide me.
2025-05-29 11:17 PM
hi @mishuk ,
please refer to AN5031 (for STM32MP15) and https://wiki.st.com/stm32mpu/wiki/STM32_MPU_ROM_code_overview#Boot_from_SD_card
And if you don't want to Flashload your SD-Card on target using CubeProgrammer, see: https://wiki.st.com/stm32mpu/wiki/How_to_populate_the_SD_card_with_dd_command
Regards
2025-05-30 3:41 AM
Hi, Patrick
thank you for your reply. Now I know, that I should update OTP for setting actual pin layout for booting from SD card. That`s fine.
I tried reading OTP data (like described in wiki), but it fails. My log follows:
mishuk@mishukhp:~/stm/STM32CubeProgrammer/bin$ ./STM32_Programmer_CLI -c port=usb1 -otp displ
-------------------------------------------------------------------
STM32CubeProgrammer v2.14.0
-------------------------------------------------------------------
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 003300403432510B37373739
DFU protocol: 1.1
Board : --
Device ID : 0x0500
Device name : STM32MP15xx
Device type : MPU
Revision ID : --
Device CPU : Cortex-A7
UPLOADING OTP STRUCTURE ...
Partition : 0xF2
Size : 1024 Bytes
Uploading OTP data:
Error: unable to get the associate alternate setting of partition ID: 0xf2
Error: please make sure that your alternate settings have string descriptors with the right format
Error: the specified partition: 0xf2 is unreachable
Error: Read OTP Partition failed
Error: Uploading the OTP structure failed
Error: Initializing the OTP structure failed
Where did I get wrong ? How can I read and update OTP data ?
I forgot to mention that we are stuck with infrastructure based on STM ecosystem release 3, and I use STM32CubeProgrammer v2.14.0
2025-05-30 5:51 AM
Hi,
maybe try the lightweight https://wiki.st.com/stm32mpu/wiki/STM32PRGFW-UTIL
You should update to latest STM32CubeProgrammer (it should not create regression, whatever ecosystem you are using).
Regards