FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [March 2012 Threads] Using xTimerReset() inside a timer callbackPosted by J. Day on March 20, 2012 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
RE: Using xTimerReset() inside a timer callbackPosted by Richard on March 21, 2012 It is not a problem to call the reset function from inside the callback.
Regards.
RE: Using xTimerReset() inside a timer callbackPosted by J. Day on March 21, 2012 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.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|