Question
STM32L4S9 locked by cube programmer?
Hello,
I am facing some strange behavior when I try to debug a stm32l4s9 MCU using Atollic TrueStudio 9.3.0.
When I try to debug the mcu using a st-link v2 I get following output:
STMicroelectronics ST-LINK GDB server. Version 5.1.0
Copyright (c) 2018, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v1.3.0
-------------------------------------------------------------------
Log output file: C:\Users\CKRENS~1\AppData\Local\Temp\STM32CubeProgrammer_a04520.log
ST-LINK SN : 56FF71065182525043221987
ST-LINK FW : V2J33S7
Voltage : 3.20V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x470
Device name : STM32L4Rxxx/STM32L4Sxxx
Device type : MCU
Device CPU : Cortex-M4
Memory Programming ...
Opening and parsing file: C:\Users\CKRENS~1\AppData\Local\Temp\ST-LINK_GDB_server_a04520.srec
File : C:\Users\CKRENS~1\AppData\Local\Temp\ST-LINK_GDB_server_a04520.srec
Size : 93084 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing external memory sectors [0 13]
Erasing memory corresponding to segment 1:
Erasing external memory sectors [24 33]
File segment @0x08000000 is not 255-bytes aligned. It will be aligned to @0x07FFFFF8
File segment @0x08018000 is not 255-bytes aligned. It will be aligned to @0x08017F77
Download in Progress:
Error: Writing in address 0x07FFFFF8 is not supported with JTAG/SWD debug port
Error: failed to download Segment[0]
Error: failed to download the File
Time elapsed during download operation: 00:00:00.082
Verifying ...
Error: Failed to read memory at address 0x07FFFFF8 during verification
Error: Download verification failed
Encountered Error when opening C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\Servers\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe
Error in STM32CubeProgrammer
Debugger connection lost.
Shutting down...If I try to read the device flash memory using ST-LINK Utility I get this:

I can only read zeros and the read protection is suddenly set to level 1. If I disconnect the device from power und connect it again, I can read the flash memory just fine.

The read protection is set to Level 0 again.
Do you know anything about this topic?
Thank you,
Christian
