cancel
Showing results for 
Search instead for 
Did you mean: 

CubeProgrammer connect to UART interface

KFang.1
Associate II

I am using CubProgrammer (version 2.4.0) to update the flash on NUCLEO-G070 board.

When I select the device target i/f as ST-Link and connect, I can do flash programming.

When I select the target i/f is UART, the Com Port shows up correctly about this device. However, I couldn’t connect. The error message is:

Serial Port COM4 is successfully opened.

17:48:09 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off

17:48:10 : Timeout error occured while waiting for acknowledgement.

17:48:10 : Timeout error occured while waiting for acknowledgement.

Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...

Do I need to put the STM32G07 Boot0 pin LOW? What am I missing? 

Another question:

Is the Flasher-STM32 a subset of the CubProgrammer? It can only do flash programming with target device i/f is UART? 

10 REPLIES 10
TDK
Guru

If you want to use the UART bootloader to connect to the board, you need to put the MCU in bootloader by holding BOOT0 during reset.

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

Hi @KFang.1​ 

in order to use UART interface for Firmware download you have to check you are booting on System bootloader.

To force boot on system bootloader (instead of User Flash) you can set this Option Byte configuration (using STLink Interface with STM32CubeProgrammer) :

nBOOT_SEL => Checked.

nBOOT1 => Checked.

nBOOT0 => Unchecked.

best regards,

Houda

KFang.1
Associate II

Thanks. This works! I had another follow up question with that. I'll submit as a new case.

What happen is that I didn't Unchecked the nBOOT0 (and nBOOT_SEL is check), now after I programmed the device once successfully, I can no longer put the device in bootLoader mode (pull the bootmode pin high during reset would not help). How to recover that? Where and how to modify the bootloader configuration setting?

TDK
Guru

You can change the option bits (nBOOT0, nBOOT_SEL, etc.) using ST-Link. If you disabled the system bootloader, that's your only option.

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

Thanks for the fast reply! I can use the ST_Link to connect it and have the nBOOT_SEL uncheck (back to legacy mode) and click "apply". Now I can flash in a new program. However, I still can not put the device in BootLoader mode by using the BootMode pin (hold BootMode pin high, then press Reset).

It works! I need to power cycle the board after the modification. Big thanks!

MWon.1
Associate II

Hi,

I'm having the same problem and I can't use your solution.

When I connect STLink I don't have those options in Option Byte menu. I only have BOR_LEV value to define.

I'm working with STM32F411CEU6

Make a new post will all relevant details rather than jumping on an old one. The STM32F4 doesn't have the same option bytes as the STM32G0.

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

Ok, sorry... I didn't create a new post because I have exactly the same problem as the initial post (can't interface with UART).

I just follow the general rule to not open a new thread if the root problem seem to be the same.