2020-09-30 12:06 AM
Hi.,
Because i wanted to verify if the processes worked as well on my work provided Laptop. I ran the homework a second time.
The TFM Homework of course resulted in mutliple Errors and nothing worked. But now i can't even use the L5 Board anymore. I get no output on the Serial and the usb part shows a fail.txt with the following content:
The interface firmware FAILED to reset/halt the target MCU
Trying to connect the STCubeProgrammer also now fails with: DEV_TARGET_NOT_HALTED
So i can't manually wipe the device and restore it again.
Quick help would be appreciated.
2020-09-30 12:16 AM
Hi,
if you launch the STEP1_prepare_L5_for_TFM.bat to you see any error ? If yes, could you show the log.
Br
2020-09-30 12:23 AM
C:\STM32SecuWS\TFM\Scripts>echo off
"STEP1 prepare L5-Nucleo option byte for TFM script"
-------------------------------------------------------------------
STM32CubeProgrammer v2.5.0
-------------------------------------------------------------------
ST-LINK SN : 066AFF353638425043085717
ST-LINK FW : V2J37M26
Board : NUCLEO-L552ZE-Q
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x472
Revision ID : Rev B
Device name : STM32L5xx
Flash size : 512 KBytes (default)
Device type : MCU
Device CPU : Cortex-M33
Mass erase ...
Error: failed to erase memory
Error: Mass erase operation failed.
Please verify flash protection
MCU Reset
Software reset is performed
-------------------------------------------------------------------
STM32CubeProgrammer v2.5.0
-------------------------------------------------------------------
ST-LINK SN : 066AFF353638425043085717
ST-LINK FW : V2J37M26
Board : NUCLEO-L552ZE-Q
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x472
Revision ID : Rev B
Device name : STM32L5xx
Flash size : 512 KBytes (default)
Device type : MCU
Device CPU : Cortex-M33
UPLOADING OPTION BYTES DATA ...
Bank : 0x00
Address : 0x40022040
Size : 32 Bytes
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Error: Uploading Option Bytes bank: 0 failed
Error: Initializing the Option Bytes failed
-------------------------------------------------------------------
STM32CubeProgrammer v2.5.0
-------------------------------------------------------------------
ST-LINK SN : 066AFF353638425043085717
ST-LINK FW : V2J37M26
Board : NUCLEO-L552ZE-Q
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x472
Revision ID : Rev B
Device name : STM32L5xx
Flash size : 512 KBytes (default)
Device type : MCU
Device CPU : Cortex-M33
UPLOADING OPTION BYTES DATA ...
Bank : 0x00
Address : 0x40022040
Size : 32 Bytes
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Error: Uploading Option Bytes bank: 0 failed
Error: Initializing the Option Bytes failed
-------------------------------------------------------------------
STM32CubeProgrammer v2.5.0
-------------------------------------------------------------------
ST-LINK SN : 066AFF353638425043085717
ST-LINK FW : V2J37M26
Board : NUCLEO-L552ZE-Q
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x472
Revision ID : Rev B
Device name : STM32L5xx
Flash size : 512 KBytes (default)
Device type : MCU
Device CPU : Cortex-M33
UPLOADING OPTION BYTES DATA ...
Bank : 0x00
Address : 0x40022040
Size : 32 Bytes
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Error: Uploading Option Bytes bank: 0 failed
Error: Initializing the Option Bytes failed
"**************************************************************"
"Option setting"
"**************************************************************"
"TZ : enabled "
"SRAM2_RST : disabled "
"SECBOOTADD0 : 0x180032 -> 0x0C001900"
"DBANK : enabled "
"SECWM1_PSTRT: 0x0 -> 0x08000000"
"SECWM1_PEND : 0x6F -> 0x08037800"
"SECWM2_PSTRT: 0x7f -> 0x0803f800"
"SECWM2_PEND : 0x00 -> 0x08000000"
"**************************************************************"
"Board is ready to receive the TFM binaries, press key"
Drücken Sie eine beliebige Taste . . .
2020-09-30 12:28 AM
Please launch a command line and do this :
cd C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin
STM32_Programmer_CLI -c port=SWD mode=UR -ob displ
And share the result, this will allow me to understand your option byte configuration.
2020-09-30 12:30 AM
PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> .\STM32_Programmer_CLI.exe -c port=SWD mode=UR -ob displ
-------------------------------------------------------------------
STM32CubeProgrammer v2.5.0
-------------------------------------------------------------------
ST-LINK SN : 066AFF353638425043085717
ST-LINK FW : V2J37M26
Board : NUCLEO-L552ZE-Q
Voltage : 3.27V
Error: ST-LINK error (DEV_TARGET_NOT_HALTED)
PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>
The target doesn't want to connect to the CubeProgrammer anymore.
2020-09-30 12:38 AM
try this one : STM32_Programmer_CLI -c port=SWD mode=HotPlug -ob displ
2020-09-30 12:39 AM
-------------------------------------------------------------------
STM32CubeProgrammer v2.5.0
-------------------------------------------------------------------
ST-LINK SN : 066AFF353638425043085717
ST-LINK FW : V2J37M26
Board : NUCLEO-L552ZE-Q
Voltage : 3.27V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x472
Revision ID : Rev B
Device name : STM32L5xx
Flash size : 512 KBytes (default)
Device type : MCU
Device CPU : Cortex-M33
UPLOADING OPTION BYTES DATA ...
Bank : 0x00
Address : 0x40022040
Size : 32 Bytes
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Error: Uploading Option Bytes bank: 0 failed
Error: Initializing the Option Bytes failed
PS C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin>
2020-09-30 12:51 AM
I will handle your issue by mail
2020-09-30 01:23 AM
Ok Thanks to support i now got my solution:
.\STM32_Programmer_CLI.exe -c port=SWD mode=HotPlug -ob displ
now you should see some output.
STM32_Programmer_CLI -c port=SWD mode=HotPlug -ob RDP=0xAA
Optionally(not verified if it is the solution):
try running:
STEP9_remove_TrustZone.bat
it should work(while blue and red led are shining)
to reinstall the working state for the homework run step 1 and step2 batch files again
2020-09-30 02:44 AM
To complete the previous message, the issue was due to the fact RDP level has been set to 0xBB ( level 1) with an empty flash.
To be able to connect we needed to activate embedded bootloader to connect and set the RDP to level 0.
Then connection is now possible.