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.

CC2541 Writing custom values to NV

Hi

I'd like to implement several modes of operation, e.g., mode A has advertising interval to 300ms, mode B has 500ms, etc.

My understanding is that the mode will need to be written to NV since advertising interval (and many other parameters) will require a reset in order to come to effect.

Is there a way to write custom values to NV? According to the docs, osal_snv_write() only takes a "valid NV item" as a parameter. What might be the NV item for custom values?

Thanks

  • There is no problem to write custom value to NV. You can add your own NVID like those defined in bcomdef.h.

  • Hello,

    Please see the BLE SW Developer's Guide, which is in the SDK. Many parameters, including Advertising settings, do not require a reset in order to take effect nor are they stored to NV. You can implement, as YK states, custom storage to NV of these parameters, but this would be outside the BLE Stack APIs.

    Best wishes