NVS in watchdog callback

Hi,

I'm trying to save system uptime when the watchdog callback occurs.

The NVS functionality works when calling nvs_write elsewhere in code.

Calling nvs_write inside the watchdog callback, I always receive -ETIMEDOUT. The documentation for NVS states"In a multi-threaded application, another thread might intercept the fault and the NVS API will return an -ETIMEDOUT error." what does that mean?

Parents Reply
  • Hi Vidar,

    First of all I should mention that task watchdog is used if that changes anything.

    In my watchdog callback I have tried to create a while loop printing the uptime to measure the amount of time available before the reset occours. This gave me around 40 ms which is plenty to save uptime in NVS.

    Since topic creation, I have been succesfull in writing to nvs by taking the WDT sample and added the NVS functionality. However as soon as i set CONFIG_BT=y, the NVS is giving me the ETIMEDOUT error. Why does it not work with BT enabled? 

Children
Related