Hello,
To remove ECC errors from flash simply erase it.
I see you are using Lauterbach.
So initialize flash list for the device, or just the block where is the error.
Then do
flash.auto.all
flash.erase.all
flash.auto.off
Best regards,
Peter
Hmm,
Thats not safe for sure.
Once you encounter multibit ECC you wont be able to repair it from your code unless you have supervisor unit with image of failing flash block ready to erase and program it in such failure case.
Not sure how you imagine it to do so. It will require external to micro programming. Like update in garage or OTA.
Best regards,
Peter