Flash resets itself.
In one of the prototypes that I am working on, I have been writing certain values to Winbond-W25Q128JV. The prototype works fine for a couple of hours then the flash resets on its own. Also, I am unable to re-upload the program unless I wait for at least half an hour. After P2 is reprogrammed it works for a while again then the flash is reset. And so goes on the cycle. Any suggestions in this regard? Thank you in advance.