cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G070KBT6 does not exit USART1 bootloader without a hard reset

EMill.1
Associate II

How can I exit STM32G070KBT6  USART1 bootloader without cycling the power?

All I have to do to exit the USART1 bootloader on the STM32G030K8T6 or the Nucleo-G031K8 is to set the nBoot0 bit in the FLASH_OPTR register and then it immediately starts running the application code.

If I do the exact same thing with a STM32G070KBT6 it only runs the application code after I cycle the power.

I need the ability to exit the STM32G070KBT6  USART1 bootloader without cycling the power so I can upgrade firmware remotely.  Is there a different way to exit the bootloader using the USART?

This issue can be reproduced using the STM32CubeProgrammer

  • Program the target PCB with the STM32G070KBT6 with some simple code to blink an LED so you can tell when the PCB is running the program (LED blinking), or the PCB is in the bootloader (LED not blinking).
  • Use an ST-Link to put the target PCB with the STM32G070KBT6 into the bootloader by changing the following Option Bytes User Configuration bits:
    • BOOT_LOCK = unchecked
    • nBOOT_SEL = checked
    • nBOOT1 = checked
    • nBOOT0 = unchecked 
  • Then click “Apply”.
  • Click “Disconnect”.
  • You can power down now and disconnect the ST-Link.
  • Connect a USB to serial port cable between the computer and USART1 on the target PCB with the STM32G070KBT6.
  • Power up the target PCB.  The target PCB should boot to the bootloader and the LED should not be blinking.
  • In the STM32CubeProgrammer select “USART” instead of “ST-LINK” then click “Connect”.
  • Change the User Configuration bits so it will boot to the application (main flash memory). 
    • BOOT_LOCK = unchecked
    • nBOOT_SEL = checked
    • nBOOT1 = checked
    • nBOOT0 = checked
  • Then click “Apply”.
  • Notice the LED is still not blinking.  The only way to make the application run is to cycle the power.  After the power is cycled it boots to the application and the LED blinks.
  • If you do the same exact procedure with the STM32G030K8T6 it does not require the power to be cycled to run the application.  The application starts running and the LED blinks as soon as you click on “Apply” to change nBOOT0 from unchecked to checked.
6 REPLIES 6
Sarra.S
ST Employee

Hello @EMill.1,

Have you checked STM32 microcontroller system memory boot mode, to see the difference between STM32G03 and STM32G07.

 

 

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.

I'm trying to exit the STM32G07 USART bootloader by setting the nBoot0 bit in the Flash Option register. 

I noticed in AN2606 in Table 92 that V11.2 of the STM32G07 bootloader shows the following issue: "Option byte launch missing when using USART protocol". 

STM32G07 bootloader version.png

Do you have more information about this issue?

Could this be the reason that setting the nBoot0 bit via the USART on the STM32G03 exits the bootloader as expected, but setting the nBoot0 bit via the USART on the STM32G07 does not exit the bootloader?

Maybe your steps isnt optimal. Why you dont use run command . This provide start application ability better.

In gui on CPU panel if i rememmber or

MM1_0-1696443825850.png

 

The STM32G07 does not have a USART bootloader "run" command (see AN3155).

Is there more information about the issue "Option byte launch missing when using USART protocol" that is mentioned in AN2606 in Table 92 and could this be the reason the STM32G07 is not exiting the bootloader when the nBoot bit is set in the Flash Option register?

Can someone who has actually read the question I posted and has used the bootloader via the USART and read the documentation (AN2606 & AN3155) please answer the question.

 

Ok i name it run but mean GO and i dont see any word about GO command not exist in ...

Is there more information about the issue "Option byte launch missing when using USART protocol" that is mentioned in AN2606 in Table 92 and could this be the reason the STM32G07 is not exiting the bootloader when the nBoot0 bit is set in the Flash Option register?