%CLI% -c port=SWD mode=UR freq=100 reset=HWrst -e all
timeout /t 2 >nul
%CLI% -c port=SWD mode=UR freq=100 reset=HWrst -ob RDP=0xAA
timeout /t 2 >nul
%CLI% -c port=SWD mode=UR freq=100 reset=HWrst -e all
timeout /t 2 >nul
%CLI% -c port=SWD mode=UR freq=100 reset=HWrst -ob displ

=================================================
        STM32 FLASH and PROTECTION SCRIPT
=================================================
[STEP 1 / 6] 🛡️  Сброс уровня защиты RDP до Level 0 (0xAA) с полным стиранием...
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.19.0
      -------------------------------------------------------------------

ST-LINK SN  : 92014102080032524B413836
ST-LINK FW  : V2J38S7
Board       : --
Voltage     : 3.22V
SWD freq    : 100 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size  : 128 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M3
BL Version  : --


Mass erase ...

Mass erase successfully achieved
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.19.0
      -------------------------------------------------------------------

ST-LINK SN  : 92014102080032524B413836
ST-LINK FW  : V2J38S7
Board       : --
Voltage     : 3.22V
SWD freq    : 100 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size  : 128 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M3
BL Version  : --


UPLOADING OPTION BYTES DATA ...

  Bank          : 0x00
  Address       : 0x4002201c
  Size          : 8 Bytes



  Bank          : 0x01
  Address       : 0x1ffff800
  Size          : 16 Bytes




PROGRAMMING OPTION BYTES AREA ...

  Bank          : 0x01
  Address       : 0x1ffff800
  Size          : 16 Bytes



UPLOADING OPTION BYTES DATA ...

  Bank          : 0x00
  Address       : 0x4002201c
  Size          : 8 Bytes



  Bank          : 0x01
  Address       : 0x1ffff800
  Size          : 16 Bytes



OPTION BYTE PROGRAMMING VERIFICATION:

Option Bytes successfully programmed

Time elapsed during option Bytes configuration: 00:00:00.841
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.19.0
      -------------------------------------------------------------------

ST-LINK SN  : 92014102080032524B413836
ST-LINK FW  : V2J38S7
Board       : --
Voltage     : 3.22V
SWD freq    : 100 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size  : 128 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M3
BL Version  : --


Mass erase ...

Mass erase successfully achieved
      -------------------------------------------------------------------
                       STM32CubeProgrammer v2.19.0
      -------------------------------------------------------------------

ST-LINK SN  : 92014102080032524B413836
ST-LINK FW  : V2J38S7
Board       : --
Voltage     : 3.22V
SWD freq    : 100 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size  : 128 KBytes (default)
Device type : MCU
Device CPU  : Cortex-M3
BL Version  : --


UPLOADING OPTION BYTES DATA ...

  Bank          : 0x00
  Address       : 0x4002201c
  Size          : 8 Bytes



  Bank          : 0x01
  Address       : 0x1ffff800
  Size          : 16 Bytes




OPTION BYTES BANK: 0

   Read Out Protection:

     RDP          : Enabled (Flash memory is read-protected.)

   User Configuration:

     WDG_SW       : 0x1 (Software watchdog)
     nRST_STOP    : 0x1 (No reset generated)
     nRST_STDBY   : 0x1 (No reset generated)

   User Data:

     Data0        : 0xFF  (0xFF)
     Data1        : 0xFF  (0xFF)