Hi, I have connected ST LINK to Lora successfully, but whenever I try to flash anything or erase or interact with anything in the board, it does not want to erase or download.
I have set the option bytes read out protection to AA, it was set to AA beforehand, does any body know what the solution might be?
Are the ST-Link and target board properly connected?
Below is the log file of ST-Link. Compare it with your log file.
You may find out something.
08:06:58 : UR connection mode is defined with the HWrst reset mode
08:06:58 : ST-LINK SN : 112D060032124353354B4E00
08:06:58 : ST-LINK FW : V2J37S7
08:06:58 : Board : --
08:06:58 : Voltage : 3.13V
08:06:58 : SWD freq : 4000 KHz
08:06:58 : Connect mode: Under Reset
08:06:58 : Reset mode : Hardware reset
08:06:58 : Device ID : 0x497
08:06:58 : Revision ID : Rev Y
08:06:58 : Debug in Low Power mode is not supported for this device.
08:06:59 : UPLOADING OPTION BYTES DATA ...
08:06:59 : Bank : 0x00
08:06:59 : Address : 0x58004020
08:06:59 : Size : 96 Bytes
08:06:59 : Bank : 0x01
08:06:59 : Address : 0x58004080
08:06:59 : Size : 8 Bytes
08:06:59 : UPLOADING ...
08:06:59 : Size : 1024 Bytes
08:06:59 : Address : 0x8000000
08:06:59 : Read progress:
08:06:59 : Data read successfully
08:06:59 : Time elapsed during the read operation is: 00:00:00.007
08:07:06 : Memory Programming ...
08:07:06 : Opening and parsing file: STM32WL_Blink.ino.hex
08:07:06 : File : STM32WL_Blink.ino.hex
08:07:06 : Size : 16.82 KB
08:07:06 : Address : 0x08000000
08:07:06 : Erasing memory corresponding to segment 0:
08:07:06 : Erasing internal memory sectors [0 8]
08:07:06 : Download in Progress:
08:07:07 : File download complete
08:07:07 : Time elapsed during download operation: 00:00:00.614
08:07:07 : Verifying ...
08:07:07 : Read progress:
08:07:07 : Download verified successfully
08:07:07 : RUNNING Program ...
08:07:07 : Address: : 0x08000000
08:07:07 : Application is running, Please Hold on...
08:07:07 : Start operation achieved successfully
They are, I have GND, CLK and SWDIO connected between ST LINK v2 and the board and both connected to the PC.
Below are the logs with a verbosity of 1
21:35:37 : STM32CubeProgrammer API v2.17.0 | Windows-64Bits
21:35:41 : UR connection mode is defined with the HWrst reset mode
21:35:44 : ST-LINK SN : B55B5A1A000000006B93F001
21:35:44 : ST-LINK FW : V2J45S7
21:35:44 : Board : –
21:35:44 : Voltage : 3.25V
21:35:44 : SWD freq : 4000 KHz
21:35:44 : Connect mode: Normal
21:35:44 : Reset mode : Hardware reset
21:35:44 : Device ID : 0x497
21:35:44 : Revision ID : Rev Y
21:35:44 : Debug in Low Power mode is not supported for this device.
21:35:44 : UPLOADING OPTION BYTES DATA …
21:35:44 : Bank : 0x00
21:35:44 : Address : 0x58004020
21:35:44 : Size : 96 Bytes
21:35:44 : Bank : 0x01
21:35:44 : Address : 0x58004080
21:35:44 : Size : 8 Bytes
21:35:44 : UPLOADING …
21:35:44 : Size : 1024 Bytes
21:35:44 : Address : 0x8000000
21:35:44 : Read progress:
21:35:44 : Data read successfully
21:35:44 : Time elapsed during the read operation is: 00:00:00.006
21:36:22 : MASS ERASE …
21:36:22 : Error: Mass erase operation failed.Please verify flash protection
21:37:15 : Read File: C:\Users\ksedr\OneDrive\Desktop\Blink.hex
21:37:15 : Number of segments: 1
21:37:15 : segment[0]: address= 0x8000000, size= 0x1C08
21:37:27 : Memory Programming …
21:37:27 : Opening and parsing file: Blink.hex
21:37:27 : File : Blink.hex
21:37:27 : Size : 7.01 KB
21:37:27 : Address : 0x08000000
21:37:27 : Erasing memory corresponding to segment 0:
21:37:27 : Erasing internal memory sectors [0 3]
21:37:27 : Error: failed to erase memory
21:37:27 : Error: failed to erase memory
Why does your Programmer “MASS ERASE”? Do you have any options set?
Have you tried “Apply” RDP=AA again?