I am using ATSAMD10C14A and wants to store data for persistency in NV Memory.
Since I am new to Smart Processors, I would appreciate if some one can points me to the right document to understand how nvm works.
I see that it has 16KB of Flash size, 256 pages with 64bytes per page.
Datasheet says that the base address for NVMCTRL is ox41004000, is this the NVM Base address? ( I guess not)
For writing data, can I write a single byte in a given page? Is the sytax for that is as shown below or does it require some sequence of commands to be followed?
byte_location = page(n*4)+0; //for writing first byte in the page, =0 for first byte in first page
NVM_BASE_ADDR + byte_location = 0x55;
How do I identify if my NVRAM location is never written? basically I want to check if my mcu is first time powered up? I can do this by writing some pattern on first boot but just curious
Thanks in advance!