nvs_set hanging the task problem

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

nvs_set hanging the task problem

Postby fly135 » Fri Mar 02, 2018 3:40 pm

I ran into an issue where calling "nvs_set_str" occasionally hangs the task and I get either watchdog reboots or reports that the WD isn't being serviced. The task is running at priority 0. I raised the priority to 10 and it appears that this fixed the problem. I then lowered the priority to 1 and it still seems fine. Is this possibly some sort of priority inversion problem where a higher priority task is calling lock in the nvs module?

Am I not following some general guideline regarding priorities? I'm thinking that I should run non-time critical tasks at zero unless I see there is some issue in it getting serviced, which then probably means I'm out of CPU.

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

Re: nvs_set hanging the task problem

Postby ESP_igrr » Sat Mar 03, 2018 9:13 pm

Priority 0 is used by the idle tasks, application task priorities typically start from 1.

Who is online

Users browsing this forum: No registered users and 84 guests