cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify boot configuration bits STM32G030?

JSope.1
Associate II

Hello everybody:

I’m facing the following problem. To boot the microcontroller right know I have pin PA14 – BOOT0 to GND through a 10K pull down resistor (This pin is also shared with SYS_SWCLK) and BOOT0, nBOOT_SEL bit to 0 -> Boot area main Flash memory.

I want to achieve the same thing with nBOOT_SEL, nBOOT1, NBOOT0 bits.

To do that, I connect the programmer and access the option bytes -> user configuration -> set the pins as shown in the image and apply.


_legacyfs_online_stmicro_images_0693W00000bit99QAA.pngWhen I disconnect the programmer, power off then power on again the program doesn’t boot (now PA14 – BOOT0 is not connected with pull-down resistor). I am doing something wrong?

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Sarra.S
ST Employee

Hello @JSope.1​,

In fact, once BOOT0 pin is pulled to GND, there is no need to configure nBOOT0 bit and nBOOT1 bit, you either configure these options bytes or work with the BOOT0 pin.

To make it clear, you either work with BOOT0 pin, in this case nBOOT SEL must be 0, nBOOT0 and nBOOT1 bits won't matter


_legacyfs_online_stmicro_images_0693W00000biy1PQAQ.png 

Or you work with options bytes, in this case nBOOT_SEL bit =1, and the option bytes will determine your selected boot area


_legacyfs_online_stmicro_images_0693W00000biy23QAA.png

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.

View solution in original post

4 REPLIES 4
Sarra.S
ST Employee

Hello @JSope.1​,

In fact, once BOOT0 pin is pulled to GND, there is no need to configure nBOOT0 bit and nBOOT1 bit, you either configure these options bytes or work with the BOOT0 pin.

To make it clear, you either work with BOOT0 pin, in this case nBOOT SEL must be 0, nBOOT0 and nBOOT1 bits won't matter


_legacyfs_online_stmicro_images_0693W00000biy1PQAQ.png 

Or you work with options bytes, in this case nBOOT_SEL bit =1, and the option bytes will determine your selected boot area


_legacyfs_online_stmicro_images_0693W00000biy23QAA.png

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.

JSope.1
Associate II

Hello, first of all sorry for the late response:

I have done a test with only option bits as you described, nBOOT_SEL bit to 1, BOOT0 bit to 0 and nBOOT1 pin to 1.

I made those changes with the programmer connected to the microcontroller with the STM32CubeProgrammer.

I wrote a program to blink a led, when I disconnect the device from power and from the debugger and then power on again, the led doesn't blink. It looks like the micro is in Reset permanently or Halted.

I am doing something wrong?

Thank you in advance. (Using the pin works fine).

> nBOOT_SEL bit to 1, BOOT0 bit to 0 and nBOOT1 pin to 1.

You mean nBOOT0 bit to 0? Look at the second picture of what @Sarra.S​  posted.

JW

No, sorry for the typo, nBOOT0 bit to 1.

JS