cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer cannot connect to board using ST-LINK V3

SedCore
Associate III

Hi, I get the below error when trying to connect to my B-U585I-IOT02A board in "Hot plug" and "Hardware reset" modes, whatever is the frequency. I get the same error even with BOOT0 High.

I'm using STM32Cube Programmer v2.17.0

SedCore_0-1727362562478.png
Connection is successful only when I keep on pressing the reset button, but there is no option byte set and any attempt to set option bytes fails.

Thanks in advance for your support.

24 REPLIES 24
SedCore
Associate III

@TDK I mean, option bytes are not checked. Meaning that they are set to zero. I should have said it that way.

When holding down the Reset button, STM32CubeProgrammer connects to the board, and here is what I can see:

SedCore_1-1727377351420.png

SedCore_2-1727377392532.png

SedCore_3-1727377442623.png

SedCore_4-1727377481442.png

As soon as I release the Reset button, it gets disconnected from the board.

Thanks for the clarification. I wonder if it's reading the option bytes at all. When you're able to connect, does the log indicate it reads things successfully? Can you read the content in the flash?

This is a U5, so it doesn't have RDP, but it has the product state thing which is similar.

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

No, it has RDP also :

AScha3_0-1727416501749.png

 

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

Hello @TDK , here is what I can see on the screen when I connect to the board by pressing the reset button:

Screenshot 2024-09-27 151241.png

The U5 has RDP.

Oh it's H5 that doesn't have RDP.

I'm not convinced that you're actually connected there. Reading all 0 in indicative of something going wrong, despite nothing in the log indicating such.

Out of ideas here. Holding BOOT0 high during reset should prevent it from doing any user code, which should allow you to connect successfully. However, if option bits are set to prevent the bootloader from loading under these conditions, you're a bit stuck.

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

Whether BOOT0 is high or low, the behavior is the same, I have to keep the reset button pressed down.

Could it be that the STM32U5 is continuously resetting?

That's a strong possibility. Here are other things that would cause what you're seeing:

  • Chip constantly resetting (NRST going low).
  • Chip performs FLASH operation immediately on startup.
  • Chip goes into low-power mode.
  • Chip re-initializes the SWD pins.

Booting into the bootloader will prevent any of these from happening, but of course you need a way to actually do that.

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

Ok, I see. But yet the problem is about being able to boot into the bootloader. I don't have idea on how to do so.

The log, when connecting under reset, shows : it reading the option bytes.

But as you show them: all zero.  RDP also ! (This is RDP level 1 on other chips - here it not in the table.)

So no matching rdp byte, could be ->

AScha3_1-1727463700682.png

 

So if its on RDP level 1, maybe you can connect with terminal ...try:

AScha3_0-1727463341379.png

-> read in um2851 ...complex game.

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

There is nothing appearing on the terminal when I connect the board. I also tried to press down the reset button before connecting to the terminal, but there's still nothing on the terminal screen.

I'm not sure that this is related with a RDP level because if it was the case, something should have appeared on the terminal screen.