For our project, we have large amount of data which needs to be remembered over Power Cycles (Non Volatile). So we thought of using the Flash itself for this purpose as we have 512Kb of flash.
As we decided to use flash, I started implementing handlers to read/write flash locations. And Attached is the code I used (tweaked out of S12X boot loader).
I am trying to Write to the flash locations from 0x7A00. But my system is getting reset continuously when this code is executed.
Please someone help me with the code to access Flash locations to store my Non Volatile data.
Original Attachment has been moved to: Flash_Handlers.txt.zip