cancel
Showing results for 
Search instead for 
Did you mean: 

I can't flash to STM32 MCUs any more. after I accidentally wrote to Option bytes in STM32 CubeProgramming. How do I do?

KSuwa.1
Associate

I can't flash to STM32 MCUs any more. after I accidentally wrote to Option bytes in STM32 CubeProgramming.

Now status is

PS C:\palm\programe\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin> .\STM32_Programmer_CLI.exe -c port=swd -ob displ

     -------------------------------------------------------------------

                      STM32CubeProgrammer v2.8.0

     -------------------------------------------------------------------

ST-LINK SN : 066BFF525649898367213942

ST-LINK FW : V2J37M26

Board      : NUCLEO-L432KC

Voltage    : 3.26V

SWD freq   : 4000 KHz

Connect mode: Normal

Reset mode : Software reset

Device ID  : 0x435

Revision ID : Rev Z

Device name : STM32L43xxx/STM32L44xxx

Flash size : 128 KBytes

Device type : MCU

Device CPU : Cortex-M4

BL Version : 0x__

UPLOADING OPTION BYTES DATA ...

 Bank         : 0x00

 Address      : 0x40022020

 Size         : 20 Bytes

�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�? 100%�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?

OPTION BYTES BANK: 0

  Read Out Protection:

    RDP         : 0xAA (Level 0, no protection)

  BOR Level:

    BOR_LEV     : 0x0 (BOR Level 0, reset level threshold is around 1.7 V)

  User Configuration:

    nRST_STOP   : 0x1 (No reset generated when entering Stop mode)

    nRST_STDBY  : 0x1 (No reset generated when entering Standby mode)

    nRST_SHDW   : 0x1 (No reset generated when entering the Shutdown mode)

    IWDG_SW     : 0x0 (Hardware independant watchdog)

    IWDG_STOP   : 0x0 (Freeze IWDG counter in stop mode)

    IWDG_STDBY  : 0x0 (Freeze IWDG counter in standby mode)

    WWDG_SW     : 0x0 (Hardware window watchdog)

    nBOOT1      : 0x1 (Boot from system memory when BOOT0=1)

    SRAM2_PE    : 0x1 (SRAM2 parity check disable)

    SRAM2_RST   : 0x1 (SRAM2 is not erased when a system reset occurs)

    nSWBOOT0    : 0x1 (BOOT0 taken from PH3/BOOT0 pin)

    nBOOT0      : 0x1 (BOOT0 = 0, boot from system memory when nSWBOOT0=1 and main flash is empty,otherwise, boot from main flash memory)

  PCROP Protection:

    PCROP1_STRT : 0xFFFF (0x807FFF8)

    PCROP1_END  : 0x0 (0x8000000)

    PCROP_RDP   : 0x1 (PCROP zone is erased when RDP is decreased)

  Write Protection:

    WRP1A_STRT  : 0xFF (0x807F800)

    WRP1A_END   : 0x0 (0x8000000)

    WRP1B_STRT  : 0xFF (0x807F800)

    WRP1B_END   : 0x0 (0x8000000)

How do I do?

4 REPLIES 4
MM..1
Chief III

Change connection to under reset and set write protection back or RDP back to 0. Simpler is use GUI utility as CLI.

KSuwa.1
Associate

Thank you for fast answer.

I will use GUI. I choose Mode: under reset connection. and Where I setting set write protection back or RDP back to 0?

I use for this old stlink utility, has menu option bytes. With new "Programmer" i dont help you.

TDK
Guru

Why can't you flash anymore? I don't see any errors in the log you posted.

If you feel a post has answered your question, please click "Accept as Solution".