Page 1 of 1

nvs_set hanging the task problem

Posted: Fri Mar 02, 2018 3:40 pm
by fly135
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.

Re: nvs_set hanging the task problem

Posted: Sat Mar 03, 2018 9:13 pm
by ESP_igrr
Priority 0 is used by the idle tasks, application task priorities typically start from 1.