Macro can be used to convert a time specified in milliseconds The time is specified in RTOS tick periods. The RTOS task does not consume any CPU time when it is in If a notification is not already pending when ulTaskNotifyTake() The maximum time to wait in the Blocked state for a notification to be received This isĮquivalent to the value of a binary semaphore being leftĪt zero (or empty, or 'not available') after a successful Reset to 0 before ulTaskNotifyTake() exits. Is set to pdTRUE then the RTOS task's notification value is This isĮquivalent to the value of a counting semaphore beingĭecremented by a successful call to xSemaphoreTake(). Is set to pdFALSE then the RTOS task's notification value isĭecremented before ulTaskNotifyTake() exits. If an RTOS task notification is received and xClearCountOnExit XTaskNotifyTake() does not have this parameter and always waits for notifications on index 0. Notification values on which the calling task will wait for a notification to The index within the calling task's array of UlTaskNotifyTakeIndexed() with the uxIndexToWaitOn parameter set to 0. Calling ulTaskNotifyTake() is equivalent to calling ulTaskNotifyTake() is the original API function, and remains backwardĬompatible by always operating on the notification value at index 0 in theĪrray. New set of API functions that could address specific notifications within theĪrray. Single notification value with an array of notification values necessitated a Prior to FreeRTOS V10.4.0 each task had a single "notification value", andĪll task notification API functions operated on that value. Must set to 1 in FreeRTOSConfig.h (or be left undefined) for these macros to be available.ĬonfigTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in Not zero, decrementing the task’s notification value before it returns. UlTaskNotifyTake() will return when the task’s notification value is Where as xTaskNotifyWait() will return when a notification is pending, Note: Each notification within the array operates independently – a task can only block on one notification within the array at a time and will not be unblocked by a notification sent to any other array index. The task does not consume anyĬPU time while it is in the Blocked state. The notification value acts more like a counting semaphore.Īn RTOS task can use ulTaskNotifyTake() to block to wait for a Semaphore, or decrement the task’s notification value on exit, in which case Zero on exit, in which case the notification value acts like a binary UlTaskNotifyTake() can either clear the task’s notification value to Parameter set to eIncrement (the two are equivalent). XTaskNotify() function with the function’s eAction Other tasks and interrupts should send notifications to it using either the When a task is using a notification value as a binary or counting semaphore UlTaskNotifyTake() and ulTaskNotifyTakeIndexed() are equivalent macros - the only differenceīeing ulTaskNotifyTakeIndexed() can operate on any task notification within theĪrray and ulTaskNotifyTake() always operates on the task notification at array index 0. Is the equivalent that uses a notification value in place of a semaphore. UlTaskNotifyTake() is a macro intended for use when a task notification isīinary or counting semaphore alternative.įreeRTOS semaphores are taken using the xSemaphoreTake() API function, ulTaskNotifyTake() More bits in one of the receiving task's notification values. Optionally update one of the receiving task’s notification values in a number of different ways.įor example, a notification may overwrite one of the receiving task's notification values, or just set one or A direct to task notification is an event sentĭirectly to a task that can unblock the receiving task, and Uint32_t ulTaskNotifyTakeIndexed( UBaseType_t uxIndexToWaitOn,Įach task has an array of 'task notifications' (or just 'notifications'), each Uint32_t ulTaskNotifyTake( BaseType_t xClearCountOnExit, Kernel > API Reference > Direct To Task Notifications > ulTaskNotifyTake() ulTaskNotifyTake / ulTaskNotifyTakeIndexed
0 Comments
Leave a Reply. |