2026-05-28 9:35 PM - last edited on 2026-06-05 1:49 AM by KDJEM.1
Hi
One of a small production batch of our boards built around STM32F767ZGT6 has some bizarre behavior. When we tried to program it with STM32CubeProgrammer and a ST-LINK/V2 tool, occasionally we can download a test firmware, but if we power cycle the board, more often than not, we would not be able to download the same firmware again nor to perform a full chip erase. Please see the log below:
21:17:34 : Disconnected from device.
21:17:35 : UR connection mode is defined with the HWrst reset mode
21:17:35 : ST-LINK SN : 53FF6E064980555733371287
21:17:35 : ST-LINK FW : V2J45S7
21:17:35 : Board : --
21:17:35 : Voltage : 3.20V
21:17:35 : SWD freq : 4000 KHz
21:17:35 : Connect mode: Under Reset
21:17:35 : Reset mode : Hardware reset
21:17:35 : Device ID : 0x451
21:17:35 : Revision ID : Rev Z
21:17:35 : Debug in Low Power mode is not supported for this device.
21:17:36 : UPLOADING OPTION BYTES DATA ...
21:17:36 : Bank : 0x00
21:17:36 : Address : 0x40023c14
21:17:36 : Size : 8 Bytes
21:17:36 : UPLOADING ...
21:17:36 : Size : 8192 Bytes
21:17:36 : Address : 0x8000000
21:17:36 : Read progress:
21:17:36 : Data read successfully
21:17:36 : Time elapsed during the read operation is: 00:00:00.063
21:17:39 : Opening and parsing file: stm32f767-board-test-v1.hex
21:17:39 : Memory Programming ...
21:17:39 : File : stm32f767-board-test-v1.hex
21:17:39 : Size : 688.88 KB
21:17:39 : Address : 0x00200000
21:17:39 : Erasing memory corresponding to sector 0:
21:17:39 : Erasing internal memory sectors [0 4]
21:17:40 : Erasing memory corresponding to sector 0:
21:17:40 : Erasing internal memory sectors [4 17]
21:17:41 : Error: failed to erase memory
21:17:41 : Error: failed to erase memory
21:18:01 : Disconnected from device.
21:18:01 : UR connection mode is defined with the HWrst reset mode
21:18:01 : ST-LINK SN : 53FF6E064980555733371287
21:18:01 : ST-LINK FW : V2J45S7
21:18:01 : Board : --
21:18:01 : Voltage : 3.20V
21:18:01 : SWD freq : 4000 KHz
21:18:01 : Connect mode: Under Reset
21:18:01 : Reset mode : Hardware reset
21:18:01 : Device ID : 0x451
21:18:01 : Revision ID : Rev Z
21:18:01 : Debug in Low Power mode is not supported for this device.
21:18:01 : UPLOADING OPTION BYTES DATA ...
21:18:01 : Bank : 0x00
21:18:01 : Address : 0x40023c14
21:18:01 : Size : 8 Bytes
21:18:01 : UPLOADING ...
21:18:01 : Size : 8192 Bytes
21:18:01 : Address : 0x8000000
21:18:01 : Read progress:
21:18:01 : Data read successfully
21:18:01 : Time elapsed during the read operation is: 00:00:00.063
21:18:03 : Opening and parsing file: stm32f767-board-test-v1.hex
21:18:03 : Memory Programming ...
21:18:03 : File : stm32f767-board-test-v1.hex
21:18:03 : Size : 688.88 KB
21:18:03 : Address : 0x00200000
21:18:03 : Erasing memory corresponding to sector 0:
21:18:03 : Erasing internal memory sectors [0 4]
21:18:03 : Error: failed to erase memory
21:18:03 : Error: failed to erase memory
21:18:06 : Disconnected from device.
21:25:44 : UR connection mode is defined with the HWrst reset mode
21:25:44 : ST-LINK SN : 53FF6E064980555733371287
21:25:44 : ST-LINK FW : V2J45S7
21:25:44 : Board : --
21:25:44 : Voltage : 3.20V
21:25:44 : SWD freq : 4000 KHz
21:25:44 : Connect mode: Under Reset
21:25:44 : Reset mode : Hardware reset
21:25:44 : Device ID : 0x451
21:25:44 : Revision ID : Rev Z
21:25:44 : Debug in Low Power mode is not supported for this device.
21:25:44 : UPLOADING OPTION BYTES DATA ...
21:25:44 : Bank : 0x00
21:25:44 : Address : 0x40023c14
21:25:44 : Size : 8 Bytes
21:25:44 : UPLOADING ...
21:25:44 : Size : 8192 Bytes
21:25:44 : Address : 0x8000000
21:25:44 : Read progress:
21:25:44 : Data read successfully
21:25:44 : Time elapsed during the read operation is: 00:00:00.054
21:25:49 : MASS ERASE ...
21:25:56 : Mass erase successfully achieved
21:25:56 : UPLOADING ...
21:25:56 : Size : 8192 Bytes
21:25:56 : Address : 0x8000000
21:25:56 : Read progress:
21:25:57 : Data read successfully
21:25:57 : Time elapsed during the read operation is: 00:00:00.062
21:26:00 : Opening and parsing file: stm32f767-board-test-v1.hex
21:26:00 : Memory Programming ...
21:26:00 : File : stm32f767-board-test-v1.hex
21:26:00 : Size : 688.88 KB
21:26:00 : Address : 0x00200000
21:26:00 : Erasing memory corresponding to sector 0:
21:26:00 : Erasing internal memory sectors [0 4]
21:26:01 : Erasing memory corresponding to sector 0:
21:26:01 : Erasing internal memory sectors [4 17]
21:26:06 : Download in Progress:
21:26:14 : File download complete
21:26:14 : Time elapsed during download operation: 00:00:14.327
21:26:43 : Disconnected from device.
21:26:45 : UR connection mode is defined with the HWrst reset mode
21:26:45 : ST-LINK SN : 53FF6E064980555733371287
21:26:45 : ST-LINK FW : V2J45S7
21:26:45 : Board : --
21:26:45 : Voltage : 3.20V
21:26:45 : SWD freq : 4000 KHz
21:26:45 : Connect mode: Under Reset
21:26:45 : Reset mode : Hardware reset
21:26:45 : Device ID : 0x451
21:26:45 : Revision ID : Rev Z
21:26:45 : Debug in Low Power mode is not supported for this device.
21:26:45 : UPLOADING OPTION BYTES DATA ...
21:26:45 : Bank : 0x00
21:26:45 : Address : 0x40023c14
21:26:45 : Size : 8 Bytes
21:26:45 : UPLOADING ...
21:26:45 : Size : 8192 Bytes
21:26:45 : Address : 0x8000000
21:26:45 : Read progress:
21:26:45 : Data read successfully
21:26:45 : Time elapsed during the read operation is: 00:00:00.053
21:26:47 : Opening and parsing file: stm32f767-board-test-v1.hex
21:26:47 : Memory Programming ...
21:26:47 : File : stm32f767-board-test-v1.hex
21:26:47 : Size : 688.88 KB
21:26:47 : Address : 0x00200000
21:26:47 : Erasing memory corresponding to sector 0:
21:26:47 : Erasing internal memory sectors [0 4]
21:26:48 : Erasing memory corresponding to sector 0:
21:26:48 : Erasing internal memory sectors [4 17]
21:26:53 : Download in Progress:
21:27:00 : File download complete
21:27:00 : Time elapsed during download operation: 00:00:13.937
21:27:07 : Disconnected from device.
21:27:12 : UR connection mode is defined with the HWrst reset mode
21:27:13 : ST-LINK SN : 53FF6E064980555733371287
21:27:13 : ST-LINK FW : V2J45S7
21:27:13 : Board : --
21:27:13 : Voltage : 3.20V
21:27:13 : SWD freq : 4000 KHz
21:27:13 : Connect mode: Under Reset
21:27:13 : Reset mode : Hardware reset
21:27:13 : Device ID : 0x451
21:27:13 : Revision ID : Rev Z
21:27:13 : Debug in Low Power mode is not supported for this device.
21:27:13 : UPLOADING OPTION BYTES DATA ...
21:27:13 : Bank : 0x00
21:27:13 : Address : 0x40023c14
21:27:13 : Size : 8 Bytes
21:27:13 : UPLOADING ...
21:27:13 : Size : 8192 Bytes
21:27:13 : Address : 0x8000000
21:27:13 : Read progress:
21:27:13 : Data read successfully
21:27:13 : Time elapsed during the read operation is: 00:00:00.054
21:27:16 : Opening and parsing file: stm32f767-board-test-v1.hex
21:27:16 : Memory Programming ...
21:27:16 : File : stm32f767-board-test-v1.hex
21:27:16 : Size : 688.88 KB
21:27:16 : Address : 0x00200000
21:27:16 : Erasing memory corresponding to sector 0:
21:27:16 : Erasing internal memory sectors [0 4]
21:27:17 : Erasing memory corresponding to sector 0:
21:27:17 : Erasing internal memory sectors [4 17]
21:27:17 : Error: failed to erase memory
21:27:17 : Error: failed to erase memory
21:27:25 : MASS ERASE ...
21:27:25 : Error: Mass erase operation failed.Please verify flash protection
Given the same firmware was able to run and do what it is designed to do on other boards from the same batch, I don't think the firmware itself is doing something out of line on this particular board. More likely there is some hardware issue with this board. Given the behavior described here, can someone offer a pointer to what could be the hardware issue and if there is some way the board can be salvaged?
Thanks.
Solved! Go to Solution.
2026-05-29 11:22 AM
If 1/25 boards isn't working, it's not a firmware or software issue, it's a hardware one. Something on the board is incorrect. It sounds like a power issue which could be caused by a cold solder joint, wrong component, solder bridge or similar.
I'd reflow the board or at least the chip. Measuring power rail and NRST line on a scope when the issue occurs might also show clues.
If the connection isn't reliable, anything reported by STM32CubeProgrammer is best effort. Don't read too much into it, but don't expect that trying different setting or a different program will solve the underlying hardware issue.
2026-05-28 9:55 PM
I measured the voltage on VCAP1/2, both are reliably at 1.2V, and BOOT0 is reliably pulled to GND. Also PDR_ON is connected to VCC(3.3V). Hope this will help understand the issue.
2026-05-29 3:17 AM - edited 2026-05-29 3:55 AM
@Zhiyong Li wrote:More likely there is some hardware issue with this board.
So please post your schematics & layout.
Some good, clear photos would also help.
How is your ST-Link connected? Are you sure it's genuine?
How to recognize a genuine ST-LINK/V2 versus a cloned one
How to write your question to maximize your chances to find a solution
PS:
Is your hardware design in accordance with AN4661, Getting started with STM32F7 Series MCU hardware development ?
2026-05-29 3:30 AM
The F767 family are not exactly low-power devices, so layout and component placement are probably crucial.
I'm not a hardware designer, but perhaps some experienced users or ST staff can look at it.
The description sounds like the design is "borderline critical".
Flashing usually happens with HSI and default settings, i.e. low clock speeds.
I would try some "working boards" with simple test programs at the intended full target clock speed.
2026-05-29 7:35 AM
Thanks for your response.
The other 24 boards from the same batch have been running as designed for months, so I don't think the problem is design, more likely something happened during assembly/handling/re-work. We replaced a SPI flash chip after receiving the boards from board house. I will upload a photo of the problematic board later.
Regarding ST-LINK/V2 tool, judging by the appearance, it looks genuine. It has been around for a long time (code: B 2012 42), I don't recall how we acquired it. We also had problem programming this board with a third party tool, Flash-Pro-XS. That was actually when we first realized there is something wrong with this board.So programming tool is also unlikely the problem.
There are also some other odd behavior:
1) failure to change option bytes in STM32CubeProgrammer. when we first had problem with it, we noticed that all sectors were under write protection while all other option bytes were as default. When we tried to remove write protection in STM32CubeProgrammer, we ran into issues similar to what described here:
09:29:05 : OPTION BYTE PROGRAMMING VERIFICATION:
09:29:05 : Error: Expected value for Option Byte "IWDG_STOP": 0x0, found: 0x1
09:29:05 : Error: Option Byte Programming failedBut luckily we were able to remove write protection in good old ST-Link-Utility(v4.6.0.0) at first attempt, while several attempts via STM32CubeProgrammer failed.
2) Unable to read a portion of flash content after successful programming via ST-link-utility. When we tried to program this board via st-link-utility (after successfully removing write protection), programming and verification went smoothly. But when the board was power cycled, st-link-utility threw an error message complaining reading from 0x80XXXX failed. I got two different address in two occasions.
The board itself seems like a lost cause. But I would like to figure out why this is happening. Losing 1 out of 25 boards doesn't seem like a good odds to live with.
2026-05-29 11:22 AM
If 1/25 boards isn't working, it's not a firmware or software issue, it's a hardware one. Something on the board is incorrect. It sounds like a power issue which could be caused by a cold solder joint, wrong component, solder bridge or similar.
I'd reflow the board or at least the chip. Measuring power rail and NRST line on a scope when the issue occurs might also show clues.
If the connection isn't reliable, anything reported by STM32CubeProgrammer is best effort. Don't read too much into it, but don't expect that trying different setting or a different program will solve the underlying hardware issue.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.