Any known issue with xTaskNotifyStateClear() v10.2.0?

Either I am misunderstanding the API, xTaskNotifyStateClear or there must be a bug.

ulTaskNotifyTake(TRUE, 30000) returns immediately after even I clear any pending notifications by calling xTaskNotifyStateClear(NULL) right before I call ulTaskNotifyTake().
Both functions are called by same task.
And I triple-checked to make sure that there is absolutely no vTaskNotifyGive() called while those two functions are called.
Obviously vTaskNotifyGive() is called several times before I call xTaskNotifyStateClear().
This is all for testing to make sure xTaskNotifyStateClear() is working the way it’s described.

So below is a sequence of calls:
Task A calls vTaskNotifyGive(TaskB_Handle)
Task A calls vTaskNotifyGive(TaskB_Handle)
Task A calls vTaskNotifyGive(TaskB_Handle)
Task B calls vTaskNotifyStateClear(NULL)
Task B call vTaskNotifyTake(TRUE, 30000)
Amazingly vTaskNotifyTake() returns immediately.

Does anyone know if I am misunderstanding something here?
Appreciate help.
Regards,
James

A misunderstanding I think. Tasks have a notification state and a notification value. As per the API docs, “Where as xTaskNotifyWait() will return when a notification [state] is pending, ulTaskNotifyTake() will return when the task’s notification value is not zero, decrementing the task’s notification value before it returns.” ulTaskNotifyTake() will return if its notification value is non zero - clearing the task’s notification state doesn’t change the notification value.

Curious as to why this is noted to be a ‘known issue’?

Thanks Richard for your reply.
I updated the title to be “Any known issue with xTaskNotifyStateClear() v10.2.0?”
I meant it to be a question not a statement. :slight_smile:

So I should have used xTaskNotifyWait() instead of xTaskNotifyTake() in my scenario.
Looks like then I have to use xTaskNotifyWait() although I do not need multi bit notifications.