Showing results for 
Search instead for 
Did you mean: 

STM32MP135 - Programmatically set boot pins and restart the ROM Boot

Associate II

We are developing a board with stm32mp135 processor and to load the entire operating system on the external mmc we set the boot pins in USB boot programming mode, after which we use Stm32 cube programmer.
If we wanted to carry out this operation even when the card is sealed and only has the external USB connector, how could we do it? Is it possible to programmatically change the state of the boot pins from a resident SW application, restart the processor, use the stm32 cube progremmer again and then restore the state of the boot pins and reset again?
Essentially we would like to carry out the procedure described in

(paragraph 6.2 and 7) programmatically. Is there any other solution?

ST Employee


Usually no need to play with BOOT pins (unless the platform is bricked).

If BOOT pins are set to a eMMC (BOOT=b010) and no valid TF-A header found, the Boot will automatically fallback to Serial (UART/USB). This is handy for the initial programming of the Flash.

Then, during runtime of the product, SW could set BOOT_MODE (TAMP_REG[30]) to 0xFF to ask again for a serial (UART/USB) boot, then issue an HW reset  which activate NRST pin (e.g. using RCC_MP_GRSTCSETR).



Notice that TAMP_REG[30] should be retained during NRST cycle, either by avoiding the STPMIC1 to do a VDD power cycle (default behavior set during boot in our SW deliveries) or having VBAT presence.


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.