I very recently (4 days ago from this post) had the same issue with EEPROM emulation as the OP. I found a write to address 0x00000000 in the code. In my case I tracked it down to the ADC initialize function that passed an ADC address of 0x00000000 fr...
Great timing! I had this same FLASH SR register issue that I figured out 4 days ago.Short answer: find the unintentional 'write' in the code to an address in FLASH. That sets the two bits in question.In my case there was a write to 0x00000000 from th...