I am not able to Enable Mass Erase from its Disabled state
Is there any way to change FTFC_FSEC[MEEN] from 0x11 to 0x10 in register the debugger shows it is Readonly register
Or I would Like to know any other way to Mass Erase
Hello,
I think you made a mistake in the description, FSEC = 0x11 (or 0x10) = MEEN = 0b01 = Mass erase enabled.
The first sector that contains the Flash configuration field can be erased by firmware (or debugger provided the MCU is not secure) using the Erase Flash Sector FTFC command. The Mass Erase is then enabled after the MCU is reset once the new MEEN value is loaded from the flash configuration filed to the FSEC register.
Please note that the first sector contains not only the flash configuration field but the reset vector etc.
Regards,
Daniel