2024-03-18 06:13 PM
Hello,
I'm trying to burn my program into the STM32G431C8U6 chip with UART on my PIN9 and PIN10.
When I want to connect the chip with STMCubeProgrammer and I got the following output:
08:57:10:466 : UR connection mode is defined with the HWrst reset mode
08:57:10:468 : RTS low
08:57:10:468 : DTR low
08:57:10:476 : Serial Port COM6 is successfully opened.
08:57:10:476 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
08:57:10:476 : No Init bits value is : 0
08:57:10:476 : Sending init command:
08:57:10:476 : byte 0x7F sent successfully to target
08:57:12:473 : Wait ends after 1 loop, dataready = 0, delay = 2000
08:57:12:474 : Timeout error occured while waiting for acknowledgement.
08:57:12:474 : No response from target received
08:57:12:475 : Retrying UART init connection...
08:57:12:477 : byte 0x7F sent successfully to target
08:57:12:483 : Wait ends after 1 loop, dataready = 1, delay = 3
08:57:12:483 : Received response from target: 0x1f
08:57:12:483 : Activating device: OK
08:57:12:483 : Board : --
08:57:12:483 : Sending GetID command and its XOR:
08:57:12:484 : byte 0x02 sent successfully to target
08:57:12:484 : byte 0xFD sent successfully to target
08:57:12:485 : Wait ends after 1 loop, dataready = 1, delay = 4
08:57:12:485 : Received response from target: 0x79
08:57:12:485 : Received 4 data bytes from target : 0x01046879
08:57:12:485 : Chip ID: 0x468
08:57:12:485 : Sending Get command and its XOR:
08:57:12:485 : byte 0x00 sent successfully to target
08:57:12:485 : byte 0xFF sent successfully to target
08:57:12:494 : Wait ends after 1 loop, dataready = 1, delay = 5
08:57:12:494 : Received response from target: 0x79
08:57:12:494 : Received 1 data bytes from target : 0x0b
08:57:12:495 : size of bytes in the response: 11
08:57:12:495 : Received 13 data bytes from target
08:57:12:495 : Full received response: 0b310001021121314463735072de
08:57:12:495 : BootLoader protocol version: 3.1
08:57:12:496 : byte 0x50 sent successfully to target
08:57:12:496 : byte 0xAF sent successfully to target
08:57:12:497 : Wait ends after 1 loop, dataready = 1, delay = 3
08:57:12:497 : Received response from target: 0x1f
08:57:12:497 : Response received from device: NACK
08:57:12:497 : byte 0x11 sent successfully to target
08:57:12:497 : byte 0xEE sent successfully to target
08:57:12:593 : data sent successfully to target: 0x0800000008
08:57:13:594 : Sending GetID command and its XOR:
08:57:13:596 : byte 0x02 sent successfully to target
08:57:13:596 : byte 0xFD sent successfully to target
08:57:13:602 : Wait ends after 1 loop, dataready = 1, delay = 3
08:57:13:602 : Received response from target: 0x1f
08:57:13:603 : Response received from device: NACK
08:57:13:603 : Error: GETID command not acknowledged!
08:57:13:699 : Reemission of GetID command
08:57:13:700 : Sending GetID command and its XOR:
08:57:13:703 : byte 0x02 sent successfully to target
08:57:13:705 : byte 0xFD sent successfully to target
08:57:13:712 : Wait ends after 1 loop, dataready = 1, delay = 4
08:57:13:712 : Received response from target: 0x79
08:57:13:712 : Received 4 data bytes from target : 0x01046879
08:57:13:714 : byte 0x11 sent successfully to target
08:57:13:714 : byte 0xEE sent successfully to target
08:57:13:811 : data sent successfully to target: 0x0800000008
08:57:14:810 : Sending GetID command and its XOR:
08:57:14:811 : byte 0x02 sent successfully to target
08:57:14:814 : byte 0xFD sent successfully to target
08:57:14:818 : Wait ends after 1 loop, dataready = 1, delay = 3
08:57:14:818 : Received response from target: 0x1f
08:57:14:818 : Response received from device: NACK
08:57:14:819 : Error: GETID command not acknowledged!
08:57:14:915 : Reemission of GetID command
08:57:14:916 : Sending GetID command and its XOR:
08:57:14:919 : byte 0x02 sent successfully to target
08:57:14:921 : byte 0xFD sent successfully to target
08:57:14:929 : Wait ends after 1 loop, dataready = 1, delay = 4
08:57:14:929 : Received response from target: 0x79
08:57:14:929 : Received 4 data bytes from target : 0x01046879
08:57:17:454 : Sending GetID command and its XOR:
08:57:17:454 : byte 0x02 sent successfully to target
08:57:17:455 : bytesToWrite before send = 1
08:57:17:455 : bFlushRet = 1, bytesToWrite after flush() = 1
08:57:17:455 : waitForBytesWritten Error : ??????????????? ????????
08:57:17:455 : byte 0xFD sent successfully to target
08:57:17:456 : Wait ends after 1 loop, dataready = 1, delay = 3
08:57:17:456 : Received response from target: 0x79
08:57:17:456 : Received 4 data bytes from target : 0x01046879
08:57:17:457 : byte 0x11 sent successfully to target
08:57:17:457 : byte 0xEE sent successfully to target
08:57:17:457 : data sent successfully to target: 0x0800000008
08:57:17:458 : UPLOADING OPTION BYTES DATA ...
08:57:17:459 : Bank : 0x00
08:57:17:459 : Address : 0x1fff7800
08:57:17:460 : Size : 44 Bytes
08:57:17:461 : Sending Read command and its XOR:
08:57:17:461 : byte 0x11 sent successfully to target
08:57:17:462 : byte 0xEE sent successfully to target
08:57:17:462 : Wait ends after 1 loop, dataready = 1, delay = 3
08:57:17:463 : Received response from target: 0x1f
08:57:17:463 : Response received from device: NACK
08:57:17:464 : Error: READ command not acknowledged at address: 0x1FFF7800
08:57:17:524 : Error: Uploading Option Bytes bank: 0 failed
08:57:17:571 : Error: Initializing the Option Bytes failed
08:57:17:641 : UART PORT CLOSE
08:57:17:642 : Disconnected from device.
I'm using a optoisolator then an USB toTTL converter to connect the PC and the board. I have checked several times the chip power supply the state of boot0 and the uart wiring. Do you have any ideas as to where the problem is?
Thanks
2024-03-18 10:04 PM - edited 2024-03-18 10:08 PM
Hello @Chanles and welcome to the Community :)
Which CubeProgrammer version are you using?
Are you making a reset in your application? Are you selecting "Run after programming"?
Could you please share the Option Bytes states?
Check this post, this may help you!
2024-03-18 10:46 PM
Hi Sir,
I'm using the version 2.15.0
Yes, I have the reset on my board and I tried but had the same result.
I dont select "Run after programming" cause it's a new chip and there's no program in it and I haven't been able to successfully connect and read the Option Bytes