[STM32G051] Totally Brick after incorrect option byte change behavior.
Hello.
I'm using the TSSOP-20 package STM32G051.
After attempting to write some optional bytes, the situation is completely ruined. no longer able connect debugger, Erasing flash, and changing optional bytes.
1. My custom board is configured as follows and worked well without any problems before.
2. Working with STM32CubeProgrammer 2.16.0 and ST-LINK V3, and SWD connection.
2-1. Cannot connect with "Normal", "Under reset", "Power down" Mode. will output the following message and fail:
07:00:24 : UR connection mode is defined with the HWrst reset mode
07:00:26 : ST-LINK SN : ***
07:00:26 : ST-LINK FW : V3J13M4B5S1
07:00:26 : Board : STLINK-V3SET
07:00:26 : Voltage : 0.00V
07:00:26 : Error: ST-LINK error (DEV_TARGET_HELD_UNDER_RESET)
2-2. Can connect only with "hot plug" mode, but all return data is '0'. (Memory view, Option bytes, etc.)
If try Erase Full chip with "hot plug" mode, will output the following message and fail:
04:50:09 : MASS ERASE ...
04:50:11 : Error: Mass erase operation failed.Please verify flash protection
2-3. If attempt to change the optional byte setting with "hot plug" mode, will output the following message and indefinitely waiting.
04:52:52 : Option byte command : -ob RDP=170
04:52:52 : PROGRAMMING OPTION BYTES AREA ...
04:52:52 : Bank : 0x00
04:52:52 : Address : 0x40022020
04:52:52 : Size : 32 Bytes
ST-Link V3's activity LED blinks red/green quickly, so it appears to be continuing to attempt to exchange data.
3. On the RESET pin, 0V is measured. After connecting the external strong pull-up resistor and forcing it pull up and I tried the above process again. but still not working. (returned DEV_TARGET_HELD_UNDER_RESET)
4. I tried using with old 'STM32 ST-Link Tool'. A connection attempt is possible, but the program stops working (main window is not responding. (ST-Link V3's activity LED blinks red/green quickly too.)
It seems that the option byte is contaminated and the wrong function is running. (like Hardware IWDG option, etc.)
but Unfortunately, in the TSSOP-20 package, the BOOT0 pin is already in used by SWD.
Is there anything else I can try? thank you in advance for your support.
