Hello,
We have a simple app running on the CC2652R using the SimpleLink CC13x2 26x2 SDK v4.20.01.04. It uses both the BLE radio and Zigbee. We have been using the zclport APIs to create and manage several NV items in flash, which is a layer above the NVOCMP drivers. Recently, we ran across an article that says the application should not use the NVOCMP drivers directly, but should use the osal_snv API to manage flash items.
Flash — SimpleLink CC13x2 / CC26x2 SDK BLE5-Stack User's Guide 2.01.00.00 documentation
If that is correct, then it sounds like we should migrate our NV interface to use the osal_snv() API. Is that correct?
I started down that path and ran into a couple questions.
1. The same link I posted above seems to indicate we can only use token ID values from 0x80 to 0x8F - which only supports up to 16 application tokens. Is that correct?
2. The osal_snv_init() function seems to be called very late in the initialization - after our application init functions have been called. Can I call osal_svn_init() before the stack calls it so I can use the osal_svn_read() and _write() function during our initialization? If not, am I not able to use the osal_snv_read() and write() functions until the stack initialization is done? Is there any kind of event or notification I can use to know when the OSAL SNV system is ready for use?
3. I did write a simple function during my initialization to just try initializing the OSAL SNV (before the stack does), then reading and writing a new value. The code is as follows:
static my_struct_typedef_t my_struct = {0};
uint8_t status = osal_snv_init();
status = osal_snv_read(0x80, sizeof(my_struct), &my_struct);
// set values into my_struct
status = osal_svn_write(0x80, sizeof(my_struct), &my_struct);
--
I printed all 3 status values and got the following:
* osal_snv_init() - returned 0
* osal_snv_read() - returned 2 (INVALIDPARAMETER ?)
* osal_snv_write() - returned 5 (INVALID_MSG_POINTER ?)
Why are these simple calls failing?
Thank you