FreeRTOS Blocking on both notification and a queue?

Hi, my platform is STM32WB55x series mcu running 32Mhz internal clock and 256K SRAM, 512K flash.

I’m wondering, is it possible to block a task on, or shall we say, unblock this task on a queue and a notification? The 2 are of the logic “OR” relations. In other words, if either gets unblocked, the entire task gets unblocked, keep executing until both are blocked.

I’ve searched through this forum, found similar question but didn’t tackle my problem satisfactorily.

Please help! Thank you!

You can use queue sets to block a task on multiple queues and/or semaphores at the same time, but there is no built in way of blocking on a queue and a notification at the same time. You could do something at the application level, like use and event group too. Then have the task block on the event group. If something sends to the queue, it must then set a bit in the event group that tells the blocking task there is something in the queue. Likewise if a task sends a notification it also then sets a bit in the event group to tell the blocking task it has received an event.

1 Like

Thank your for the clarification. I’ll find a workaround, then.