cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer connection over UART error

ERazz.3
Associate II

Hi, I've some problem using SMT32CubeProgrammer.

i am trying to connect via uart to micro stm32g491 but i receive some error messages.

15:21:34:034 : RTS low

 15:21:34:034 : DTR low

 15:21:34:171 : Serial Port COM15 is successfully opened.

 15:21:34:172 : Port configuration: parity = even, baudrate = 115200, data-bit = 8,           stop-bit = 1.0, flow-control = off

 15:21:34:172 : No Init bits value is : 0 

 15:21:34:172 : Sending init command: 

 15:21:34:175 : byte 0x7F sent successfully to target

 15:21:34:176 : Wait ends after 1 loop, dataready = 1, delay = 0

 15:21:34:176 : Received response from target: 0x79

 15:21:34:191 : Activating device: OK

 15:21:34:192 : Sending GetID command and its XOR:

 15:21:34:192 : byte 0x02 sent successfully to target

 15:21:34:192 : byte 0xFD sent successfully to target

 15:21:34:192 : Wait ends after 1 loop, dataready = 1, delay = 0

 15:21:34:192 : Received response from target: 0x79

 15:21:34:192 : Received 4 data bytes from target : 0x03047b7b

 15:21:34:194 : Chip ID: 0x47B 

 15:21:34:195 : Sending Get command and its XOR:

 15:21:34:195 : byte 0x00 sent successfully to target

 15:21:34:195 : byte 0xFF sent successfully to target

 15:21:34:195 : Wait ends after 1 loop, dataready = 1, delay = 0

 15:21:34:195 : Received response from target: 0x7b

 15:21:34:196 : Error: GET command not acknowledged!

 15:21:34:197 : Reemission of Get command

 15:21:34:197 : Sending Get command and its XOR:

 15:21:34:197 : byte 0x00 sent successfully to target

 15:21:34:214 : byte 0xFF sent successfully to target

 15:21:34:214 : Received response from target: 0x1b

 15:21:34:215 : Error: GET command not acknowledged!

 15:21:34:218 : Reemission of Get command

 15:21:34:218 : Sending Get command and its XOR:

 15:21:34:222 : byte 0x00 sent successfully to target

 15:21:34:224 : byte 0xFF sent successfully to target

 15:21:34:226 : Received response from target: 0x33

 15:21:34:228 : Error: GET command not acknowledged!

 15:21:34:328 : UART PORT CLOSE 

but if I try to communicate with the embedded bootloader of stm32 using another software (for example minicom or docklite) I can communicate correctly.

here are some messages on the serial:

09/03/2022 14:37:50.788 [TX] - 7F

09/03/2022 14:37:50.804 [RX] - 79

09/03/2022 14:37:51.966 [TX] - 02 FD

09/03/2022 14:37:51.971 [RX] - 7A 03 04 7B 3F 79

09/03/2022 14:37:53.091 [TX] - 01 FE

09/03/2022 14:37:53.094 [RX] - 79 33 00 00 7B 3F

09/03/2022 14:37:53.787 [TX] - 02 FD

09/03/2022 14:37:53.793 [RX] - 7B 3F 03 04 7B 7B 3F

09/03/2022 14:37:54.490 [TX] - 01 FE

09/03/2022 14:37:54.497 [RX] - 79 71 00 00 7B 3F

why can't i use stm32cubeprogrammer software?

1 ACCEPTED SOLUTION

Accepted Solutions
Houda GHABRI
ST Employee

Hi @ERazz.3​ ,

I tested with the same device you have (same Device ID and Bootloader version), it works fine on ST Board with both CubeProgrammer 2.9.0 and 2.10 version.

So I suspect a wiring issue , you can try to reduce the Baudrate and test again?

Houda

View solution in original post

12 REPLIES 12
Houda GHABRI
ST Employee

Hi @ERazz.3 ,

Are you using the last CubeProgrammer version 2.10.0.? If not can you please switch to this version which contain many enhancement related to UART connection?

Houda

ERazz.3
Associate II

i've installed stm32cubeprogrammer 2.10.0.

it seem to be the same...

here the log.

14:29:04:255 : Activating device: OK

14:29:04:256 : Board : --

14:29:04:256 : Sending GetID command and its XOR:

14:29:04:257 : byte 0x02 sent successfully to target

14:29:04:260 : byte 0xFD sent successfully to target

14:29:04:260 : Wait ends after 1 loop, dataready = 1, delay = 0

14:29:04:306 : Received response from target: 0x79

14:29:04:306 : Received 4 data bytes from target : 0x01047b79

14:29:04:307 : Chip ID: 0x47B

14:29:04:307 : Sending Get command and its XOR:

14:29:04:309 : byte 0x00 sent successfully to target

14:29:04:312 : byte 0xFF sent successfully to target

14:29:04:312 : Wait ends after 1 loop, dataready = 1, delay = 0

14:29:04:312 : Received response from target: 0x6f

14:29:04:313 : Error: GET command not acknowledged!

14:29:04:313 : Reemission of Get command

14:29:04:313 : Sending Get command and its XOR:

14:29:04:314 : byte 0x00 sent successfully to target

14:29:04:316 : byte 0xFF sent successfully to target

14:29:04:316 : Received response from target: 0x61

14:29:04:316 : Error: GET command not acknowledged!

14:29:04:317 : Reemission of Get command

14:29:04:317 : Sending Get command and its XOR:

14:29:04:317 : byte 0x00 sent successfully to target

14:29:04:317 : byte 0xFF sent successfully to target

14:29:04:318 : Received response from target: 0xee

14:29:04:318 : Error: GET command not acknowledged!

14:29:04:341 : UART PORT CLOSE

Houda GHABRI
ST Employee

Hi @ERazz.3​ ,

Ok I will check , can you tell me if you are using CLI or GUI? If CLI command line used please.

Houda

ERazz.3
Associate II

@Houda GHABRI​  i'm using GUI.

Thanks

Houda GHABRI
ST Employee

Hi @ERazz.3​ ,

I did same checks using NUCLEO-G491RE board and connection via UART works correctly.

I see in your traces that the Device ID is not correct :

14:29:04:306 : Received 4 data bytes from target : 0x01047b79

14:29:04:307 : Chip ID: 0x47B

The correct device ID for STM32G491  is 0x479 so tell me please if you are using an ST Board? Also send me please the Bootloader version of your chip ( value of Bootloader is in 0x1FFF6FFE address).

Houda

Houda GHABRI
ST Employee

Hi @ERazz.3​ 

The Baudrate value used during connection please?

Houda

Hi, at address 0x1FFF6FFE I see 0xD2.

we're using our custom bord.

thanks

Hi, 155200

Houda GHABRI
ST Employee

Hi @ERazz.3​ ,

I tested with the same device you have (same Device ID and Bootloader version), it works fine on ST Board with both CubeProgrammer 2.9.0 and 2.10 version.

So I suspect a wiring issue , you can try to reduce the Baudrate and test again?

Houda