Hi Waan,
Are you trying to write data into flash ?
I don't know if this will help you ... but from my experience (an unpleasant one), once, I think two year ago, I've done a mistake into a program which save a variable into a eeprom at a specific time interval. I've forgot about it, and when i made the burn-in tests of the device i was surprised to see the processors were damaged after a while (something like in your case).
I may case the root cause was simple ... writing in Flash or eeprom is allowed only for a limited time.