Other Parts Discussed in Thread: CC2540, , CC2650
Tool/software: Code Composer Studio
This post is related saving bytes to SNV Flash.
I am following the section 3.10.3 in BLE Developers guide for cc2540 and cc2640. This section is related to “Using Simple NV for Flash Storage”. There according to the point “the protocol stack can be configured to reserve up to two 4 kB flash pages for SNV, although valid data is only stored in one active flash page”
So according to my understanding I can reserve up to two pages by setting OSAL_SNV preprocessor symbol in stack project. In explanation of compaction it uses the term sector. Are the terms sector and pages used here same or different. Will the api handle read/write operation on 1 page and 2 pages on its own.
Here are the two api calls
osal_snv_read(id, len, void *buf);
osal_snv_write(id, len, void *buf);
My Other question is in the doc it says the ids only available for customers is from 0x80 – 0x8F. Which is in total 16 ids. So how much number of bytes of uint8 can I write against an ID inside a buf/array. My requirement is to store less than 4kB. So can I save 4kB i.e 4096 bytes against an ID. Or two pages are divided among 16 ids. Can you please help me understand this.
My requirement is to store 4096 bytes at least in SNV. Also can I update the data against the ID later this means without erasing.