cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with "Run after programming" in CubeProgrammer with UART connection

DPark.7
Associate II

My Settings : 

STM32G070 mit BootLoader protocol version: 3.1

STM32CubeProgrammer v2.13.0

My plan :

flash my file via UART(USART2) and my MCU should start automatically after programming is finished. I will reset the nBOOT0 bit in my programm, after my own evaluation.

My result :

I tried with "Run after programming" in CubeProgrammer and "Go 0x800000" in STM32_Programmer_CLI. In both case, downloading was successfull but MCU could not start.

See attached log file : logCP_uart.log

Step 1 : nBOOT0 = 0, nBOOT1 = 1, nBOOT_SEL = 1 : this combination by Stm32G070 leads to boot from System memory (Bootloader)

Step 2 : I could access boot loader via uart (com16) and start programming.

Step 3 : My Transmitter.elf file was downloaded (line 32) and the Verifying was also successfully (line 36).

Step 4 : But the RUNNING Program from Address 0x08000000 (line 37 and 38) could not be executed. Error Message : Error: GETID command not acknowledged! (line 44)

See attached log file : logCP_CLI.txt

Log file says, that RUNNING Program was a success. But my MCU has not started.

See attached log file : logCP_swd.log

Test to compare:

I chose SWD instead of UART. In this case, the task could be executed without any problem.

1 ACCEPTED SOLUTION

Accepted Solutions

Some STM32 need power cycling after programming

Check if the watch-dog is running, you're code may run, but you'll still have to kick it.

Has it really not started? Toggle GPIO very early in Reset_Handler

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

Some STM32 need power cycling after programming

Check if the watch-dog is running, you're code may run, but you'll still have to kick it.

Has it really not started? Toggle GPIO very early in Reset_Handler

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
DPark.7
Associate II

A Great Thank for Your speedy help.

I've tried with toggling GPIO before the main starts.

Yes, my MCU has toggeled !

Now I have found out, one of our function has blockt the init process, which we have packed in startup_stm32xxx.s file. I must figure out, why this makes problem.

But my problem i have posted is solved!!!

Thanks a lot for your help!