Hi Everyone-
Is it acceptable to use xTimerReset() inside the timer’s callback function?
Before I start the scheduler, I create a timer with xAutoReload set to pdFALSE.
then I set it active using xTimerStart(). I check all the return codes to make sure
pdTRUE.
Inside the timer’s callback function, I use xTimerReset() to reload the timer.
It works but then the OS just hangs up. If I comment out the xTimerReset() code, it works fine with no issues.
Is this a bug or is this not allowed? Could i reset another timer using xTimerReset() inside a timer callback?
Thanks,
Jon
Using xTimerReset() inside a timer callback
Using xTimerReset() inside a timer callback
It is not a problem to call the reset function from inside the callback.
Regards.
Using xTimerReset() inside a timer callback
Ok, I figured this out.
I thought configTIMER_TASK_STACK_DEPTH 80 would be sufficient.
It’s not, so I bumped it to 160 and it’s fine.
Suprising, since I coded a very contrived example.