Skip to main content
Yoichi Shinoda
Senior
February 23, 2020
Solved

How do I regain ST-Link connectivity with Nucleo-H745ZI-Q with BOOT_CM7 = 0 and BOOT_CM4 = 1

  • February 23, 2020
  • 8 replies
  • 4328 views

While fiddling with H745 board to investigate how dual core works, after modifying option byte to BOOT_CM7 = 0 and BOOT_CM4, STM32CubeProgrammer (nor STLINK-gdbserver) refuses to connect to the board with "Error: No STM32 target found". The ST-Link itself is okay. Here is a log from the programmer.

22:31:39 : ST-LINK SN : 002F003D3137510E39383538
22:31:39 : ST-LINK FW : V3J5M2
22:31:39 : Voltage : 3.30V
22:31:39 : No STM32 target found!
22:31:39 : ST-LINK SN : 002F003D3137510E39383538
22:31:39 : ST-LINK FW : V3J5M2
22:31:39 : Voltage : 3.30V
22:31:39 : Error: No STM32 target found!

How do I regain access to the board?

Best answer by Houda GHABRI

Hi @Yoichi Shinoda​ ,

Sorry for late response.

Issue is confirmed and it will be fixed in next STM32CubeProgrammer release scheduled for june.

Meanwhile I sent you a patch fixing this issue , you can now reactivate the CM7 core using CM4 (access port 3) , please test and tell me if it is OK.

Anyone who is facing same issue I can share with him the patch.

best regards,

Houda

8 replies

Uwe Bonnes
Chief
February 23, 2020

Did you try to connect under reset (Reset Mode -> Hardware reset)

Yoichi Shinoda
Senior
February 23, 2020

How does the "connect under reset" supposed to work?

I configured the ST-LINK as follows and pressed "Connect" while reset button is held down, but it gives the same error, regardless of the reset button state.

0690X00000DC9R2QAL.jpg

TDK
Super User
February 24, 2020

The BOOT_CM7 bit shouldn't have an effect on st-link being able to connect. Reboot. Double check that everything is connected and powered correctly.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Yoichi Shinoda
Senior
February 24, 2020

Thanks for the suggestion.

Here I have two NUCLEO-H745ZI-Q boards, from the same order, and one of these (call it BOARD1) can be connected:

12:22:35 : ST-LINK SN : 0044002D3137511239383538
12:22:35 : ST-LINK FW : V3J5M2
12:22:35 : Voltage : 3.27V
12:22:35 : SWD freq : 24000 KHz
12:22:35 : Connect mode: Normal
12:22:35 : Reset mode : Software reset
12:22:36 : Device ID : 0x450
12:22:36 : UPLOADING OPTION BYTES DATA ...
12:22:36 : Bank : 0x00
12:22:36 : Address : 0x5200201c
12:22:36 : Size : 308 Bytes
12:22:36 : UPLOADING ...
12:22:36 : Size : 1024 Bytes
12:22:36 : Address : 0x8000000
12:22:36 : Read progress:
12:22:36 : Data read successfully
12:22:36 : Time elapsed during the read operation is: 00:00:00.001

0690X00000DCA6jQAH.jpg

However, when switching board to the problematic one (call it BOARD2), then it fails to find a target.

0690X00000DCA6oQAH.jpg

This started to happen when I tried to write BOOT_CM7 = 0 and BOOT_CM4 = 1 instead of previously working BOOT_CM7 = 1 and BOOT_CM4 = 0 pair. This write to OB in fact failed with a message from the programmer (something like "Option byte write failed").

If the BOOT_CM7/BOOT_CM4 bit actually has nothing to do with the connectivity problem, then I have to find why the target is not responding on BOARD2 and how to recover it.

Thoughts?

Btw, physical connection is just a USB cable for both BOARD1 and BOARD2. Please note that ST-LINK itself is responding, so the problem lies behind ST-LINK.

JJOSE.0
Visitor II
March 5, 2020

This procedure worked for me by bridging the BOOT0 and +3.3V pin and erasing memory with STM32 ST-LINK Utility

Yoichi Shinoda
Senior
March 10, 2020

Thanks for your reply.

Was the board in BOOT_CM7 = 0 and BOOT_CM4 = 1, and you were using USB DFU? The problematic board here doesn't even go into DFU (not detectable with STM32CubeProgrammer and one other DFU flashing utility).

Yoichi Shinoda
Senior
April 29, 2020

My theory about this issue is

1. Boot loader for this device is only written/configured to run with CM7.

2. Since BOOT_*** gates clock supplies to corresponding CPU, disabling CM7 also disables the boot loader facility completely.

3. STM32CubeProgrammer only talks to CPU0, the CM7 which is not clocked, it will fail to detect the CPU0 hence the device.

I think we really need to hear from ST, as this is a very serious situation that hard bricks the entire device, which has never been the case with existing ST MCUs with builtin boot loader.

TDK
Super User
April 29, 2020

It seemed like such a big oversight that having BOOT_CM7=0 would cause the ST-Link to be unable to connect AT ALL that I tested it with one of my H7 boards. Sure enough, after setting BOOT_CM7=1, can no longer connect to it. Not even under reset. Jokes on me. It's not like ST to have a hardware bug like that.

I can't easily connect BOOT0 to 3V3 to start the bootloader but I will try that eventually.

@Imen DAHMEN​ Any chance we could get this looked at? Seems like a note in the RM mentioning this behavior would be prudent given that it semi-bricks the device. Or even disallowing users from setting BOOT_CM7=1 in the STM32CubeProgrammer given that it irreversibly prevents it from connecting.

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

Hi @Yoichi Shinoda​ ,

Sorry for late response.

Issue is confirmed and it will be fixed in next STM32CubeProgrammer release scheduled for june.

Meanwhile I sent you a patch fixing this issue , you can now reactivate the CM7 core using CM4 (access port 3) , please test and tell me if it is OK.

Anyone who is facing same issue I can share with him the patch.

best regards,

Houda

flyingchris
Associate II
July 11, 2020

I would be interested in the patch too. I'm running into the same problem here.

RBharol
Associate III
August 13, 2020

I had the same issue. After I disabled CM7 boot, the STLink won't connect. I am using STM32H745I-DISCO board. I did this to work around it.

1) Removed power and Enabled BOOT 1. Please note that all you have to do is short the pads on R144. No need to remove R143 and put on R144. It is too tiny to handle. You will mess with pads and make it unusable. Just short R144 pads with some solder. It will put it in BOOT1 mode.

2) Power up and connect. Open STLink Utility (not the STLink programmer) and in Target->Settings select the Access port to 'access port 3'.

3) Connect.

4) Got to 'Target->Option Bytes' and Enable M7 Boot. Erase flash.

5) Now you should be able to connect via STLink Programmer as well.

6) Once confirmed connection, power off and Un-Short the R144 pads. It should now work.

Houda GHABRI
ST Employee
July 1, 2021

Hi @YVeda.1​ ,

Yes it is already implemented in V2.7.0.

Do not hesitate to open a new thread if the issue still exists for you.

Houda

jhochreiter
Associate
March 29, 2024

*** me.
I also bricked my NUCLEO-H755ZI-Q eval board with modifying option byte to BOOT_CM7 = 0 and BOOT_CM4 = 1
Connected via ST-Link on USB port.
STM32CubeProgrammer v2.16.0 cannot recover the situation:
Error: ST-LINK error (DEV_CONNECT_ERR)
Any hints?