Page 1 of 1

FreeRtos Task Notifications and queues.

Posted: Wed Mar 18, 2020 3:42 am
by Gardin
I'm very interested in using Task notifications as an light alternative for other FreeRTOS functionality, such as binary semaphores. I've already manage to build some examples using task notification for such use, but now in a real case scenario the code keep's crashing.

I have the following situation:

Three tasks are running, Task A communicates to Task B using a queue, and Task A also communicates to Task C using task notifications. In these scenario just after I call

Code: Select all

xQueueSend()
the code crashes with the following message:
(xQueueGenericSend)- assert failed!
If I comment out:

Code: Select all

xQueueSend()
everything works...

Am I missing something?

Have anyone else noticed interference between queues and task notifications?

I'm using esp-idf version 3.2.2.

Any help will or guidance will apreciated!

Thanks a lot,

Gardin.

Re: FreeRtos Task Notifications and queues.

Posted: Wed Mar 18, 2020 4:07 am
by boarchuz
This is usually because the queue isn't created yet - xQueueCreate().

You might need to share your code if that's not it.

Re: FreeRtos Task Notifications and queues.

Posted: Wed Mar 18, 2020 5:16 pm
by Gardin
Yeah, that was it.

When I was testing I comment out everything related to the queue, and after fixing another part of the code I forgot to discomment

Code: Select all

xQueueCreate
... :roll: