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.

cc2540 nvm

Other Parts Discussed in Thread: CC2540

Hi,

can we use an area in the memory to save some bytes on the CC2540?

I see that after pairing/bonding the stack saves the key on the NVM, but can I save in specific area my own parameters on the chip?

I'm not sure because there is no mention in the User guide!

if so, please send to me an example or an application note describes the NVM area that I can store and how to do it.

Thanks.

  • You'll need to edit the linker file to reserve areas of NVM, or else the compiler might put something there. The compiler isn't really a TI thing. You should read IAR's documentation about the compiler since IAR made it.

    Or you could guess at an area of memory that you don't see used in the .map file. This method is a bit riskier but should suffice for a quick hack.

  • For relatively small data, you can use the Ti's infrastructure defined in osal_snv.h.  For larger data, you have to implement your own NV management, using HalFlashWrite() and HalFlashRead().  Search this forum and you'll find discussions of both methods.