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.

CC2340R5-Q1: Processing Time of API:NVS_erase()

Part Number: CC2340R5-Q1

Tool/software:

Hi, Ti Team.

In the SDK 8.40 environment, when measuring the processing time for the API: NVS_erase(), the results were as follows.

The condition was that the size to be erased is 1 sector (2kByte).

 ・When the entire sector is '0xFF' (initial value): 0.08 msec.

 ・When the entire sector is any arbitrary value: 3.99 msec.

This indicates that erasing means writing '0xFF' to the specified memory of 1 sector, and when it is already '0xFF', it only checks that it is '0xFF' and does not actually perform the process of writing '0xFF', could this be the reason?

Best Regards.

  • Hello,

    I apologize for the late response.

    When flash is empty, all bits are actually set to 1. Knowing that, there may be some slight differences in write time when less bits are programmed (for instance, more zeros than ones). It's not due to the fact that more bits are being programmed, but because there is less probability that a second write pulse may be needed because 1 or more bits did not fully program in the first pulse. The distribution of the write time is based on several factors, like temperature and voltage. The time we report in the datasheet and elsewhere is the typical time it takes.

    Hope that helps!

    Best,

    Nima Behmanesh

  • Hi, Nima.

    Thanks for the reply.

    What does 'pulse' mean in your answer?

    Can you explain the relationship between 'pulse' and the operation of NVS_erase()?

    Also, based on your answer, please confirm if my understanding is correct.

    Is it correct that 'NVS_erase() does not write all values as 1 in a sector regardless of its current values.

    If the current value is 0, it writes it as 1, so the processing time varies depending on the number of 0 and 1'?"

    Regards.

  • Hello,

    I've asked a team member to get some more information and will get back to you either tomorrow or monday.

    Thank you for your patience regarding this matter.

    Best,

    Nima Behmanesh

  • Hello,

    This indicates that erasing means writing '0xFF' to the specified memory of 1 sector, and when it is already '0xFF', it only checks that it is '0xFF' and does not actually perform the process of writing '0xFF', could this be the reason?

    The erase operation does a pre-verify step, which checks the contents of the area being erased (sector or whole bank). If any group of 8 sectors is already erased, then a mask is set and these are not erased. This doesn't shorten the pulse, but it shortens the pre-verify step. If an entire region is already erased, then the erase doesn't occur (if everything is already set to 1's).

    This would be the reason why erasing a sector that contains all 0xFF is faster, since to flash, a sector of all 0xFF would be considered empty, therefore, greatly reducing the pre-verify step.

    A pulse is the time that we apply a high voltage to the bit cells to perform the program or erase. The program pulse time is one set of voltages for 8-10us. The erase time is a different set of voltages for 2ms.

    Best,

    Nima Behmanesh

  • Hello.

    I understand very well.

    Thank you.