cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to board after running Regression.sh in TF-M application

SedCore
Associate III

Hi, I followed all the steps from the UM2851 documentation about TF-M application. At point 10.2 I ran the regression.sh script, with the below output:

 

regression script started
Regression to RDP 0, enable tz
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.17.0
      -------------------------------------------------------------------

ST-LINK SN  : 003B00243232510239353236
ST-LINK FW  : V3J15M6
Board       : B-U585I-IOT02A
Voltage     : 3.30V
SWD freq    : 8000 KHz
Connect mode: Hot Plug
Reset mode  : Software reset
Device ID   : 0x482
Revision ID : Rev X
Device name : STM32U575/STM32U585
Flash size  : 2 MBytes (default)
Device type : MCU
Device CPU  : Cortex-M33
BL Version  : 0x0
Debug in Low Power mode enabled


UPLOADING OPTION BYTES DATA ...

  Bank          : 0x00
  Address       : 0x40022040
  Size          : 36 Bytes

▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 100%▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 100%

  Bank          : 0x01
  Address       : 0x40022068
  Size          : 8 Bytes


PROGRAMMING OPTION BYTES AREA ...
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ 50%
  Bank          : 0x01
  Address       : 0x40022068
  Size          : 8 Bytes


  Bank          : 0x00
  Address       : 0x40022040
  Size          : 36 Bytes


Reconnecting...
Error: failed to reconnect after reset !
Error: Unable to reconnect after setting the Option Bytes

 

Now I'm no longer able to connect my board to STM32Cube Programmer, unless I keep on pressing the reset button. It seems like the regression.sh script erased everything, and there is no option byte configured, as by the pictures below:

SedCore_0-1727347364924.png

SedCore_1-1727347407969.png

SedCore_2-1727347467213.png

SedCore_3-1727347520923.png

I tried to set all of them manually, but the configuration is not saved, it cannot flash it onto the device.

When I release the reset button, the device disconnects:

 

  12:45:15 : Error: Unable to get core ID
  12:45:15 : Error: Unable to get core ID
  12:45:15 : Error: Unable to get core ID
  12:45:15 : Warning: Connection to device 0x482 is lost
  12:45:16 : Disconnected from device.

 

 

Your kind support please. Thanks!

@STea @Jocelyn RICARD @SofLit 

 

4 REPLIES 4
Jocelyn RICARD
ST Employee

Hello @SedCore ,

what version of STM32CubeU5 did you use ?

Also you can try setting SW1 Boot 0 to 1 and connect in hotplug

Best regards

Jocelyn

 

I used STM32CubeU5 v1.4.0

It's the same behavior even when I set BOOT0 to high, in Hot Plug and Hardware Reset mode: I must press the reset button to connect STM32CubeProgrammer to the board, and it gets disconnected as soon as I release the reset button.

Jocelyn RICARD
ST Employee

Hello @SedCore ,

if you have a way to monitor the reset pin, you should see that the STM32U5 is continuously resetting.

This prevents the STM32Programmer from doing anything. I don't know any way to recover with this tool. Maybe another programming tool may be fast enough to stop the chip and erase the flash.

This issue was fixed on latest STM32CubeU5 1.6.0.

Best regards

Jocelyn

Hello @Jocelyn RICARD , thanks for the details.

Me neither, I don't know which programming tool can help to solve this situation.