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.

RTOS/CC1350: NVS not re-writable after reset?

Part Number: CC1350

Tool/software: TI-RTOS

I'm posting an event which in turn calls a NVS_write from the main task function. This is giving me a NVS_STATUS_ERROR back, which I thought would be helpful but it turns out it doesn't really help narrow down the cause at all, being referred to as a 'generic error' in the documentation.

Can anyone shed some light on what the possible cause of this might be?

Edit:
I used the NVS_PRE_VERIFY flag and I now get an error: NVS_STATUS_INV_WRITE, which seems to indicate an issue with changing the flash location to the location requested?

I also found this: https://e2e.ti.com/support/wireless_connectivity/proprietary_sub_1_ghz_simpliciti/f/156/p/616195/2269189

I am not writing more than 256 bytes, (only about 20). Does anyone know if there are still other outstanding issues with the NVS driver?

Another Edit: I did a complete wipe of the device memory, started it up again, and it seemed to manage to do an initiating write, and another write after that.

After doing a 'Board Reset' in debug mode the device is back to giving me the same error. I also did a pin reset and it gives the same result.

Any ideas anyone?

Another Another Edit:  The only way I can get this to write consistently is to use the NVS_WRITE_ERASE flag for the first write, and then subsequently do normal writes to replace the data that was overwritten by the flag's use. Obviously not ideal since now I am having to do twice the number of writes.

  • No idea why nobody has picked up this question.

    From what you write it's not easy to understand what is going on. Are you able to generate a minimum project that showcase this error enabling us to debug this?
  • Did you solve this issue in the end?
  • Unfortunately I have not yet solved this.

    As I described the only way I am able to write without error is if I do an NVS_WRITE_ERASE before writing, which then requires me to re-write to two structs that are stored in memory even if I only want to update one.

    I haven't had a chance to revisit the issue myself, but obviously my 'solution' isn't ideal and I'd like to understand where the true problem lies. Apologies for not providing an example project, it's been a busy project!