cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32G474 bootloader

PCarn.1
Associate III

What exactly is meant by "If Boot from FLASH"?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> So I'm wondering what I need to do to take the "no" path of "If Boot from FLASH"

Boot into something other than the flash, such as the system memory bootloader by holding BOOT0 during reset (among other options, as detailed in AN2606).

> I want to make sure the bootloader doesn't try to boot from flash.

This concept doesn't make a lot of sense. The bootloader doesn't decide where to boot from, the option bytes and settings on the BOOTx pins do. Typically, and most usefully, programs will boot into user code in the FLASH in order to run the program that was programmed onto them. But the system bootloader is another alternative.

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

View solution in original post

4 REPLIES 4
tjaekel
Senior III

The code for MCU can be stored in internal FLASH memory but also in RAM memory location.

Another good question would be: "how does bootloader know where the code entry is?" (is if from Flash or is it from RAM).

It could be done via checking what is programmed as the base address of the Vector Table (a register called "VTOR", Vector Table Origin Register, telling MCU on boot where to find the Reset_Handler starting address). It depends on bootloader how does it check where the code is located (in Flash or in RAM).

MCU can boot (start executing) from a Flash memory location or from a RAM memory location. Nothing else is meant here, I guess.

PCarn.1
Associate III

I'm specifically asking about the STM32G474 bootloader. I want to make sure the bootloader doesn't try to boot from flash. So I'm wondering what I need to do to take the "no" path of "If Boot from FLASH"

TDK
Guru

> So I'm wondering what I need to do to take the "no" path of "If Boot from FLASH"

Boot into something other than the flash, such as the system memory bootloader by holding BOOT0 during reset (among other options, as detailed in AN2606).

> I want to make sure the bootloader doesn't try to boot from flash.

This concept doesn't make a lot of sense. The bootloader doesn't decide where to boot from, the option bytes and settings on the BOOTx pins do. Typically, and most usefully, programs will boot into user code in the FLASH in order to run the program that was programmed onto them. But the system bootloader is another alternative.

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

I want to go into the system bootloader so I can flash the STM32 over USART. Otherwise, yes, I want to boot into flash.