2020-07-24 03:51 AM
Hi I'm trying to read the OTP bits on the discovery board STM32MP157C-DK2 using the STM32CubeProgrammer v2.4.0. The GUI version can't read the OTP bits, but I tried with the Command Line Interface and it gave me the following error:
C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>stm32_programmer_cli.exe --connect port=usb1 -otp displ
-------------------------------------------------------------------
STM32CubeProgrammer v2.4.0
-------------------------------------------------------------------
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 002A00413338510939303435
FW version : 0x0110
Device ID : 0x0500
Device name : STM32MPxxx
Device type : MPU
Device CPU : Cortex-A7
UPLOADING OTP STRUCTURE ...
Partition : 242
Size : 1024 Bytes
Uploading OTP data:
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒Error:
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
0%
What am I doing wrong?
My final goal is to change these OTP bits because on my custom board we have an eMMC connected to SDMMC1 and the WiFi connected to SDMMC2 (The default is the SD card on SDMMC1).
Thanks in advance!
Solved! Go to Solution.
2020-07-24 03:54 AM
Hi @DMart.3
looks like you miss the step to first load u-boot in order to get 0xf2 partition.
refer to :
https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer#How_to_fuse_STM32MP15x_OTP
Olivier
2020-07-24 03:54 AM
Hi @DMart.3
looks like you miss the step to first load u-boot in order to get 0xf2 partition.
refer to :
https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer#How_to_fuse_STM32MP15x_OTP
Olivier
2020-07-24 04:22 AM
Hi OlivierG,
Thanks! I've tried your sujestion and it worked!
On my final board I will have an eMMC instead of an SDCard connected to the SDMMC1, so I think that I have to change the emmc_if_id bits of the CFG3 word to "1", am I wright?
Thanks!
2020-07-24 07:19 AM
CFG3 is not enough, you need also to define the pins used by the BootROM.
see https://community.st.com/s/question/0D50X0000AkQJiHSQW/how-to-change-emmc-interface
2020-07-28 01:46 AM
Thanks!
We will try it soon. As soon as I have results (I hope that they are good results :) ) I will give the news!
Best Regards!
2020-07-30 07:22 AM
Hi OlivierG,
To gain some time (while my custom board is not ready), I have decided to try the eMMC on the STM32MP157A-DK1. I have changed the OTP3, 5 and 6 as referred on the link above, but the system doesn't boot up. On the ST-Link terminal there isn't any printed message and the LD6 led is flashing.
I know that it is necessary to change the Device Tree but before that it will be necessary to start the fsbl partition. On the link above it is mentioned that "... 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)".
How do I do that? Can you point me on the right direction?
I also have an STM32MP157C-DK2 board, but I don't think that this is the problem.
Thanks in advance!
2020-07-30 07:56 AM
Hi @DMart.3,
some causes which could explain the LD6 red led flashing
Beside that, I think you can load your customized TF-A and uBoot in RAM using CubeProgrammer (a stripdown .tsv is needed), then I think you can check if eMMC is accessible from uBoot (this is not possible from stock images as eMMC is expected on SDMMC2)
Regards.
2020-08-03 03:13 AM
Hi @PatrickF ! Thanks for the quick answer!
It is working now! I was looking everywere and forgot about the BOOT pins... I made the HW changes on the BOOT1 pin and now it is working.
Now, I want to use the eMMC with 8 data bits instead of the current 4 but the new lines have no signals (checking with the osciloscope). I made the following changes:
But these changes have no effect on the change to 8-bits.
Do you now what can be the problem?
Thanks in advance!
2020-08-03 04:49 AM
I'm not specialist of the SW aspects, so, some clues: