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] [November 2012 Threads] Tick Hook & semaphoresPosted by Jerry Durand on November 15, 2012 I often use Tick Hook to operate some low-jitter simple items and items where it's critical I don't miss a tick. Nothing that really would require its own task and priority level.
Anyway, no trouble so far on several projects but I just came up with a need to send a semaphore.
I assume I use xSemaphoreGiveFromISR() but do I need to use portEND_SWITCHING_ISR(xHigherPriorityTaskWoken) since I'm already in the FreeRTOS interrupt?
Will this even work?
RE: Tick Hook & semaphoresPosted by MEdwards on November 15, 2012 Yes you need to use the FromISR() version, and no you don't need to worry about the xHigherPriorityTaskWoken variable because a context switch will happen anyway after the tick hook finishes.
In older FreeRTOS versions you would still have to supply the xHigherPriorityTaskWoken parameter, just don't use it afterwards. In newer FreeRTOS versions you can just pass NULL in place of xHigherPriorityTaskWoken.
RE: Tick Hook & semaphoresPosted by Jerry Durand on November 15, 2012 Thanks! I'm still running 7.2.0, will update after this project is closed out, but will assume that's good enough to use null.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|