This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2630: Save data in NV memory

Part Number: CC2630
Other Parts Discussed in Thread: Z-STACK,

Hi,

i'm using the CC2630 with the IAR Workbench and the Z-Stack™ Home 1.2.2a. I need to save sensor data to NV memory. As discussed in other threads the osal is not accesible for the application so i need to use the zcl_port functionality. 

I initialize the item then write and after a power cycle read:

zclport_initializeNVItem(0x2FE,0x0001, sizeof(uint16_t),NULL);

uint16_t luxValueFromSensor = 500;
zclport_writeNV(0x2FE,0x0001,0, sizeof(uint16_t),&luxValueFromSensor); 

zclport_readNV(0x2FE,0x0001,0, sizeof(uint16_t), &zisMeasuredValue);

While init and write return NV_ITEM_UNINIT, the read returns SUCCESS but i always read 0.