NVS functions thread-safe?

MalteJ
Posts: 62
Joined: Wed Sep 21, 2016 10:26 pm

NVS functions thread-safe?

Postby MalteJ » Wed Jun 07, 2017 7:32 am

Hi,

are the NVS access functions for writing and reading thread safe or do I have to use a mutex in my user code when accessing/committing the flash to prevent concurrent access?

Thank you!

Best,
Malte

ESP_igrr
Posts: 2072
Joined: Tue Dec 01, 2015 8:37 am

Re: NVS functions thread-safe?

Postby ESP_igrr » Sat Jun 10, 2017 5:28 am

NVS functions (C API) do locking internally, preventing concurrent access.

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: NVS functions thread-safe?

Postby snahmad75 » Fri Apr 05, 2019 9:00 pm

Can some one confirm it that it is thread safe. we found internal fatfs gets corrupted easily. does not sound thread safe.

ESP_Sprite
Posts: 9759
Joined: Thu Nov 26, 2015 4:08 am

Re: NVS functions thread-safe?

Postby ESP_Sprite » Mon Apr 08, 2019 3:11 am

Erm, ESP_Iggr just confirmed it is thread safe, one post above yours.

snahmad75
Posts: 445
Joined: Wed Jan 24, 2018 6:32 pm

Re: NVS functions thread-safe?

Postby snahmad75 » Mon Apr 08, 2019 9:22 am

Sorry bothering again. Is it thread safe against same namespace.

Who is online

Users browsing this forum: No registered users and 121 guests