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.

LP-EM-CC2745R10-Q1: The execution of NVS_write() failed.

Part Number: LP-EM-CC2745R10-Q1

Tool/software:

Hi, Ti

When using the NVS driver for flash read/write operations, I encounter write failures when attempting to write different values after the initial write. While adding the NVS_WRITE_ERASE attribute to NVS_write() allows subsequent writes, I currently cannot perform sector erasures. Why do writes fail without NVS_WRITE_ERASE? How can I rewrite data without performing an erase operation?

 This segment will execute repeatedly, rewriting data to the same memory location.

Best regards!

Preston

  • Hello,

    I've assigned this thread to an expert and they should get back to you tomorrow.

    In the meantime, what SDK version are you running?

    Best,

    Nima Behmanesh

  • Hello,

    SDK version:simplelink_lowpower_f3_sdk_9_10_00_83

    Best regards!

    Preston

  • Greetings Preston,

    This is expected. On the CC27xx device, the flash write (flash programming) operation consists of changing bits from 1 to 0. When you perform an erase, the sector gets programmed back to 1s. After this, when you perform a write operation, the sector gets programmed correctly. Otherwise, if a bit was programmed to 0, then the write operation will not be able to set that individual bit to 1, leading to incorrect flash programming. The write operation fails because this incorrect programming is caught by the post_verify flag. This is documented in the Technical Reference Manual under section 7.2.2.5.

    It is thus important that you perform an erase before you write to the same section.

    Best,
    Achyut Ray

**Attention** This is a public forum