CC2340R5-Q1: NVS API Processing Time

Part Number: CC2340R5-Q1

Hello TI Team,

I am using SDK version 9.14.02.16.

Using the code below, I measured the processing time required to write to and erase one sector.

NVS_Params lp_nvs_params;

/* NVS has been erased. */

/* Init NVS */
NVS_init();
NVS_Params_init(&lp_nvs_params);
gh_nvs_handle = NVS_open(CONFIG_NVS_0, &lp_nvs_params);

/* gu32_d_test … 2048byte All:0x00 or 0xFF */

/* Measure NVS_write [1 Sector] time  */
GPIO_write(CONFIG_GPIO_0, GPIO_CFG_OUT_HIGH);
(void)NVS_write(gh_nvs_handle, (size_t)0, gu32_d_test, (size_t)2048, 0);
GPIO_write(CONFIG_GPIO_0, GPIO_CFG_OUT_LOW);

/* Measure NVS_erase [1 Sector] time  */
GPIO_write(CONFIG_GPIO_0, GPIO_CFG_OUT_HIGH);
(void)NVS_erase(gh_nvs_handle, (size_t)0, (size_t)2048);
GPIO_write(CONFIG_GPIO_0, GPIO_CFG_OUT_LOW);
Table: Measurement Results 
API Condition Time Unit Notes
NVS_write[1Ssector] Write "0x00"to all locations 16.5 msec Write flags = None(0)
Write "0xFF" to all locations 9.36 msec Write flags = None(0)
NVS_erase[1Ssector] Erase all locations containing "0x00"  6.3 msec  
Erase all locations containing "0xFF"  0.77 msec  
Question 1:
There is a difference between my measurements and the values shown in the datasheet. Under what conditions—such as the number of write/erase cycles—were the typical values specified in the datasheet measured?
Question 2:
Are the processing times measured through the API different from the values specified in the datasheet? If so, approximately how much overhead does the API add?
Question 3:
The processing time varies significantly depending on the value being written and the data stored before the erase operation. What causes this variation?
Additional information:
The measurements were taken on a device with fewer than 1,000 total write/erase cycles.

Best regards,