Hey @zainali
Two comments back.
First off, how do you know that interrupts are re-enabled after your erase? Have you checked the PDB Trigger bits to make sure your ADC start is being requested?
Secondly, how are you setting up boundaries for erasing the Flash? You are mentioning that you are erasing a "section" and not a "sector". How do you determine what is your start address and length when you call "FLASH_Erase"? Is it possible that you are erasing code?
I know the SDK APIs (strongly) imply that you can arbitrarily erase and write where you want and how many bytes, but this is... misleading and can result in unintended erasures and unexpected changes.
Personally, I identify the sectors where my code resides and only read/write sectors that are outside this area. Note that I ONLY work at the sector level - if I'm updating a sector I copy the sector into a buffer, update the buffer with the changes I want to make and then erase the sector and write the buffer contents into it.
Yes I know that in Flash, you should be able to write to erased cells without problem but I have had issues with this in the past. This is a case where you need to make sure you EXACTLY understand your Flash sector boundaries and work at the sector level, not arbitrary string/structure lengths.
Good luck!