I've created a project for the SAME54 xplained pro board and I'm trying to figure out how to configure the persistent storage module because I'd like to use the internal flash memory space instead of using an external eeprom.
Using atmel start I added the flash driver and the persistent storage middleware, but I'm trying to figure out how to configure it. The defaults in the Internal Flash persistent storage configuration settings shows that the Storage start address =65536, sector size=4096, Item number=10.
When I hit generate project, Atmel start generates persistent_storage_start.c/h files with examples that don't work. I'm not really surprised because I see the item number is 10 in the default settings and the example is using 1. Also, I'm not certain about the start address that is being used? Does anyone have an idea as to what it should be? Also the example has a comment mentioning an entry in the linker script, Atmel start didn't seem to do that and I'm not clear on how to add it. I'm hoping someone may have done this and can provide some help with the correct addresses and/or procedure on how to get the NVram integrated.
Any help is greatly appreciated.
* \brief Persistent storage example
* IMPORTANT! Be careful running this example. It makes assumption that storage
* area provided in Persistent storage configuration is reserved in the linker
* script. If it is not reserved, flash content may get corrupted.
// store, read and eraze one item
memset(data, 0xa5, 10);
nv_storage_write(1, 0, data, 10);
memset(data, 0x00, 10);
nv_storage_read(1, 0, data, 10);