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.

CC2642R-Q1: SNV size

Part Number: CC2642R-Q1


In cc2642-Q1 chip, the size of SNV two pages is 16k, and the number of Customer's NV ids is 16. Does that mean that each ID can store 1k bytes of data? I have seen some information that the key and other information will be stored in SNV after successful binding. Should we implement this function or has it already been implemented in the project? Because I don't know where they will be stored in the SNV?

  • Hi linqian,

    As shown in the BLE5-Stack User's Guide, simple NV flash memory is allocated for the GAP Bond Manager.  The BLE5-stack uses 49 bytes to store local info in addition to 109 bytes per bond stored.  Some care must be taken to not be close to 80% (or other compaction threshold) utilization of a sector.

    Regards,
    Ryan

  • I don't understand what you mean. My purpose is to store some personal information with SNV. Can I completely allocate Customer's NV? If so, where is it?

  • Some SNV items can be allocated for the customer (from ID range 0x0100 to 0x03FF), but several IDs are already reserved for the GAP Bond Manager.  Therefore the entire NV flash page cannot be reserved for the customer's use.  If desired, you can create a separate NVS internal region using the NVS TI Driver Runtime APIs and nvsinternal example.

    Regards,
    Ryan

  • As shown in the figure, NVS has a total of 16k bytes, and the user assigns the ids from 0x100 to 0x11F. There are 16 ids in total, so the operating space of one ID is 1k. Is my understanding correct?

  • This is not the correct approach.  The CONFIG_NVSINTERNAL Region Size shown as used by the NVOCMP (Drivers/NV/nvocmp.c from BLE project workspace) consists of two flash pages, one active page and one compaction page.  The compaction page cannot be used for active items as it is reserved for the removal of unused items.  Therefore the active area is 0x2000 or 8 kB, several bytes of which are used for the GAP Bond Manager.  The NVS driver also does not equally allocate memory space to each NV ID as this allows for different item sizes.  It may be possible to reserve ~256 bytes for each 16 items in the current design, however it would be better to increase NVOCMP_NVPAGES and increase the CONFIG_NVSINTERNAL Region Size to accommodate larger items.

    Regards,
    Ryan