I cant write to the FLASH OPTION register
Hi all
I need to write an external programmer for STM32G030J6.
I've written the SWD protocol, and I'm able to program all FLASH (if no protection applied).
the issue is: I can’t write to the FLASH OPTION: (changing protection level from 1 to 0)
I can’t convince RDP bits to become 0xAA (level0) (RDP is currently 00=LEVEL1) :
I'm trying it by using the steps described in "3.4.2: FLASH option byte programming".
if I'm running it externally as a debugger - then after writing the new value (step 2)- then the CPU doesn’t answer any more (SWD returns FAIL)
I've also tried- by downloading some simple SW into RAM and running it- still nothing.
(any other SW downloading to the RAM - works)
I've also tried to write to FLASH->OPTR. It also doesn’t want to change.
ST-LINK is able to change from LEVEL1 to LEVEL0
SO:: what does ST-LINK do that I'm missing ??
thanks for reading all this
Yona
