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] Timer callbacksPosted by Paul Coleman on March 12, 2012 If I give a semaphore from within a software timer callback do I need to use xSemaphoreGiveFromISR() version?
Thanks, Paul.
RE: Timer callbacksPosted by Richard on March 12, 2012 No. Timer callbacks run in the context of a task, so the non ISR version can be used. If the function is being called from a timer callback then the block time must be set to 0.
Regards.
RE: Timer callbacksPosted by Paul Coleman on March 12, 2012 I'm not sure which function you're referring to and xSemaphoreGive doesn't have a block time?
Thanks, Paul.
RE: Timer callbacksPosted by Richard Damon on March 12, 2012 I think Richard was just making a general comment so that if, for example, a timer function wanted to put or get data from a queue that it should use a zero block time.
I would use the word should rather than must here, as unlike in the idle hook, where blocking will likely cause a kernel crash (as suddenly NO task is ready to run), a block in a timer function doesn't cause this level of problem, the user just needs to realize that if one timer function blocks, it block the whole timer task, so no other timer functions will run, nor will the program be able to process any new timer requests (they can be queued up in the timer queue until full, but the timer task won't be removing them). There may be special conditions where this is acceptable.
RE: Timer callbacksPosted by Paul Coleman on March 12, 2012 Okay I see, thanks for the clarification :o)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|