2024-09-26 03:59 AM - edited 2024-09-26 04:01 AM
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:
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!
2024-09-26 09:07 AM
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
2024-09-26 09:11 AM - edited 2024-09-26 09:12 AM
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.
2024-09-27 01:46 AM
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
2024-09-27 06:07 AM
Hello @Jocelyn RICARD , thanks for the details.
Me neither, I don't know which programming tool can help to solve this situation.