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.

CC2640R2F: NVS Driver Erase Time

Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640

Hi,

The CC2640 datasheet specs a typical flash sector erase time of 8ms

TI's NVS_erase() function typically takes 50ms to do this, sometimes longer than 500ms.

Is a timing specification available for this driver?

Are there any guidelines about improving speed of operation?

I am using TiSimpleLinkSdkCc2640r2-3.10.00.15

Thanks for your help

Mike

  • - I assume that you are just erasing 1 sector using NVS_erase() when you do this measurement? 

    - How do you measure these times?

    - Have you tested this on a (close to) unused device to avoid age related increase of the erase time? 

  • Thanks for your reply

    Yes, I am erasing just one sector - 4096 bytes - each time.

    I measure the erase time on a logic analyser, by bracketing the call to NVS_erase() with setting and clearing a gpio line.

    I don't think there is any scope for the RTOS to extend the apparent erase time by running other tasks as the NVS driver suppresses interrupt handling during erase as described below:

    Interrupt Latency During Flash Operations

    When writing to or erasing internal flash, interrupts must be disabled to avoid executing code in flash while the flash is being reprogrammed.

    This constraint is met internally by the driver. User code does not need to safeguard against this.

    I repeated the test on a couple of new boards, and erase times were pretty consistent at 10.2ms, so comparable with the spec typical sector erase time of 8ms, so it does look like the problem is due to ageing of my original board

  • I agree that the measurement method looks correct. Since you measure close to spec on a new board the long erase time you measure indeed looks to be related to aging.