I'm using MCP5602P, I'm trying to store data into the DataFlash Memory (0x0080_0000) and wrote a code accordingly. The value got stored as I can see it on using debugger window, Memory Block, but once the power switched off and again If I see the debugger window without running the Program, the value is not seen. My idea is, though the program was flashed newly, the debugger wont erase the DataFlash Memory. Is there any project's internal Flash settings I need to make or linker cmd file I need to edit, so that I can store the value permanantly.
I'd attached the Code for DataFlash. Kindly suggest any modifications I need to make.
Original Attachment has been moved to:FlashCode.txt.zip