Preventing EFS watchdog errors | developer.brewmp.com Preventing EFS watchdog errors | developer.brewmp.com

Developer

Preventing EFS watchdog errors

My application --- which I now have running on the device --- sometimes wants to do quite a lot of work installing files into its private workspace directory.

As recommended, I'm doing all this from an IThread and am making sure to yield the thread regularly (currently around every 100ms).

Nevertheless I am still, on certain usage patterns, getting EFS watchdog kernel panics. Which is bad.

Does anyone know why this might be happening, and more importantly, how to stop it happening?

I've verified that my yield code is being called, and is:

 

 

self->resumer = ITHREAD_GetResumeCBK(self->ithread);
ISHELL_Resume(brew_shell, self->resumer);
ITHREAD_Suspend(self->ithread);
self->resumer = AKD_NULL;

This is straight out of one of the examples. I have noticed that it takes a rather short amount of time --- 0 to 1 ms. This surprises me. If the system is actually doing work it should take longer than that, right?

It sounds like the watchdog isn't getting properly kicked when I suspend the thread. For example, if the thread gets resumed before the watchdog's task does. Is there any way to manually kick the watchdog from my code to avoid this?

It appears to happen most often when I'm doing lots of reads rather than writes, which is very strange...

 

One thing you could do is to do a debug this is to DBGPRINTF each time you do a yield and then watch the logger.  The logger should show regular messages and if there is a stall you will probably find your problem (likely some file writing loop).

One thing you could do is to do a debug this is to DBGPRINTF each time you do a yield and then watch the logger.  The logger should show regular messages and if there is a stall you will probably find your problem (likely some file writing loop).