Hi,
I request you to kindly refer to the Application notes EE-355, which has a simple codes to explain how the programming of Flash device makes use of the ‘ResetFlash, EraseFlash, GetFlashStartAddress etc
The link for the Application Note is given below:
http://search.analog.com/search/ProductSearch.aspx?query=EE-355&locale=en
Kindly go through it and let me know if it helps.
Regards,
Mahesh