Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hello support team,
I am trying to integrate NVS module but after initialization, software ends at hard fault.
As seen below, handle returned by NVS_open is also not NULL.
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.
Hello Rasikraj,
From your implementation, I see that you are setting the index of NVS_open() to be zero directly. Have you configured sysconfig to use the NVS driver with a memory index of zero?
If you look at the NVS example projects provided, the index is typically a macro defined when adding an instance of the NVS driver, with the index of NVS_open() being the name of the NVS instance in sysconfig.
Thanks,
David
Hello David,
I have further update-
I was not calling NVS_close() before and seems this was the issue for hard fault.
If I call it now, seems no hard fault then.
but this means, when shall application call NVS_close()? Can it be called e.g. just going before sleep?
Regards.
Rasikraj.
Hello Rasikraj,
Glad that you are no longer getting a hard fault.
NVS_close() can be called before sleep or when the application is done using the NVS.
Regards,
David