Disable all reset sources during debugging to resolve the issue. More information is available here.
Enabled ICUM prevents access to Flash through PE1. Before any Flash operation, ICUM must be disabled.
Make sure that ICUM is disabled.
Refer to this topic.
Caused by issues in older winIDEA:
The DisableLockBits option disables the lock bits before erasing the flash. If this option is disabled and the flash sectors are locked, the erase operation fails.
Sorry this article didn't answer your question, we'd love to hear how we can improve it.
Note: This form won't submit a case. We'll just use it to make this article better.