cancel
Showing results for 
Search instead for 
Did you mean: 

how to access the bootloader with hardware only using the Pattern 10 bootloader

VWied.1
Associate III

I have looked into the AN2606 guide and found that the MCU I am interested in says the bootloader is accessed by:

Pattern 10 Boot(pin) = 0 or 1 BOOT_ADD0 or BOOT_ADD1(optionbyte) = 0x1FF0

A requirement that I have for my product is that if the device we are using doesn't have any software on it yet (by being new or by a bad firmware updated flash) that we can still do a firmware update.

To deal with this, we are wanting to have a master device on our system to set boot pins like the other STM32 products.

Is my assumption correct that a master device cannot activate the STM32 pattern 10 bootloaders directly? Is it correct to say that the STM32 device using pattern 10 needs to set an option byte in software then reset?

3 REPLIES 3
VWied.1
Associate III

To expand on my question, I am also looking at the STM32G071 as another option. This also seems to have many option bits that need to be set to be able to program the device. The table from the STM32G071 reference manual has the following table for accessing the bootloader. (see image below)

My main goal here is that a UART-connected device can trigger a firmware update. The system should also allow for a device to be recoverable if a previous firmware update failed. I can add additional hardware pins to get this working.

How could an externally connected MCU be able to do a firmware update to this device without the need for any additional hardware (just GPIO being set high/low and a single UART communication)

VWied.1
Associate III

0693W00000ANLBVQA5.png

TDK
Guru

> How could an externally connected MCU be able to do a firmware update to this device without the need for any additional hardware (just GPIO being set high/low and a single UART communication)

You need a connection to BOOT0 and NRST in general to set it in bootloader mode, after which you can communicate via UART.

  • Set BOOT0 high.
  • Set NRST low for 1ms or so, then high.
  • Communicate via UART pins with bootloader.

Some chips/families can overwrite the BOOT0 pin setting with an option byte so the answer will depend specifically on the chip you select, but that's one possibility. In general you do not need to write/modify any option bits for this to work.

If you feel a post has answered your question, please click "Accept as Solution".