2021-05-18 03:43 AM
I apologize in advance as the question is really a basic and obvious one ...
My custom board is using an STM32MP151 SoC.
Is it possible to re-write programmed OTP bits (namely, OTP Word 3 for boot modes).
My feeling is that, this is not possible (One Time Programming).
A complementary question: I try to do a soft selection of the boot source (instead of dealing with hardware pins), so I thought about fusing the OTP word so that it'd start from SPI NAND by default, then force the Serial boot using the TAMP backup register 20 if needed.
Does it makes sense ?
Thanks,
Jacques
Solved! Go to Solution.
2021-05-19 01:18 AM
Hi,
as per reference manual (see BSEC section):
This mean, on lower OTPs, you could set a anytime a bit from 0 to 1, but never clear them.
For your case, I think you don't need to fuse any OTP (except OTP WORD9 is your Serial-NAND require it), just set the Boot pins to Serial-NAND (BOOT[2:0] = 0b111).
If Flash is empty (or no valid header found), BootROM will fallback to serial boot. See https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview#Boot_interface_selection
Once application is started, you could set TAMP_REG[20] = 0xFF and reset the board to force a serial boot.
Alternatively, with DK2 and EV1 boards using Started Package, uBoot could detect User1 (PA14) button pressed during reset and enable USB DFU connection. See https://wiki.st.com/stm32mpu/wiki/LEDs_and_buttons_on_STM32_MPU_boards#Description
Regards.
2021-05-19 01:18 AM
Hi,
as per reference manual (see BSEC section):
This mean, on lower OTPs, you could set a anytime a bit from 0 to 1, but never clear them.
For your case, I think you don't need to fuse any OTP (except OTP WORD9 is your Serial-NAND require it), just set the Boot pins to Serial-NAND (BOOT[2:0] = 0b111).
If Flash is empty (or no valid header found), BootROM will fallback to serial boot. See https://wiki.st.com/stm32mpu/wiki/STM32MP15_ROM_code_overview#Boot_interface_selection
Once application is started, you could set TAMP_REG[20] = 0xFF and reset the board to force a serial boot.
Alternatively, with DK2 and EV1 boards using Started Package, uBoot could detect User1 (PA14) button pressed during reset and enable USB DFU connection. See https://wiki.st.com/stm32mpu/wiki/LEDs_and_buttons_on_STM32_MPU_boards#Description
Regards.
2021-05-19 11:40 PM
Hi,
Thanks Patrick for this very complete answer !
rgds,
Jacques
2021-05-20 07:06 AM
If my reply answered your question, please click on Select as Best at the bottom of the post. This will help other users with the same issue to find the answer faster.
2021-05-20 07:08 AM
sure ... done