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.

CC1312R: CC1312R Strange behaviour saving data on internal memory

Part Number: CC1312R
Other Parts Discussed in Thread: BLE-STACK

Hi.

  We develop a small node with CC1312R and it is a system with small consumption with a hardware switch for a minimum consumption. We have 34 pages for writing the information when the node wake up after that the node go to sleep again. And every X time the node send the information to a gateway. In the node I detect this behavior and I don't know if it is normal, but the consumption go up when happens.
 
  In CC1312R have a page or sector of 8192 and when we need to write any information with de NVS Driver we need to write the complete page (The 8192 bytes). But the strange behaviour is if the page is clean (0xFF x 8192 Bytes) write any data on page the time measure of writing is ~60 ms. But when the page have information (Page not clear) the time is growing up to ~100ms. The worst case is when have the page complete of data and write anything the time to save is ~100 ms.
 
  If I clean the page (Writing 0xFF to the complete page) and write any new information the time is ~60 ms again, but when write more information to the page the time is growing up again.
 
  If the page is clean if write the page complete and any information on any part of the page the time measure es ~60ms, but when have bytes different on page the time is up to ~100ms.
 
  Can you confirm is that normal?? Because our system is low power consumption and with this behavior is not the best for us.
 
Best Regards.

  • Hi Fran,

    If a write operation trigger an NVS compaction, the write operation will take longer and use more power. It could be this is happening.

    If the NVS page is operating close to the data limit (e.g. 80% full) compactions will be triggered very often and the whole page will be compacted each time. This is obviously not an optimal way to use the NV pages. 

    You can read more about NV storage e.g. in the BLE-Stack User's Guide: