I was also able to get the application note software zip file AN3404sw.zip which was extremely helpful. I have just a few questions that kind of confuse me when looking at the code compared to what they are saying.
The documentation says that we simply cannot write a value to 0x1870 and then rewrite a different value to the 0x1870 address without first erasing the page of flash that contains the 0x1870 range (512 bytes). I would assume that if we had all 512 locations written to that we would want to save that we would have to store the whole page in RAM and then re-write everything except for the address that has to change?
Section 3.3 on application note AN3404 states that "0x1870 - 0x286f address range is used for data storage, divided into eight blocks of 512 bytes. Each block is separated into small blocks of eight bytes because it is the quantity of characters received from SCI."
Looking at the code, I do not see where it is limiting to 0x268f and I thought that we could go to 0x7FFF. I do see the following code in the software main.c
// Unsecured status flash
const unsigned char flash_security @0xFFBF = 0xFE;
const unsigned char NVPROT_Data @0xFFBD = 0x7E;
const unsigned char EEPAdrs @0x1870;
const unsigned char EEPAdrsEnd @0x1890; <----- This confuses me
I am not too sure why it has EEPAdrsEnd set to 0x1890. The code says that if it reaches 0x1891 that it should erase the page using function NVM_Erase_Page and start over with 0x1870. When it erased the page, will it erase 0x1870 through 0x1D82 or does it just erase from 0x1870 through 0x1890? My initial thought is that they just used 0x1890 to show how it works and I would like to just get a little clarification.
These are the only few questions that I have at this time as I am still tinkering with this code to familiarize myself and hopefully enter into a more comfortable application programming environment!