FreeRtos Task Notifications and queues.

Gardin
Posts: 31
Joined: Fri Dec 13, 2019 4:53 pm

FreeRtos Task Notifications and queues.

Postby Gardin » Wed Mar 18, 2020 3:42 am

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.

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: FreeRtos Task Notifications and queues.

Postby boarchuz » Wed Mar 18, 2020 4:07 am

This is usually because the queue isn't created yet - xQueueCreate().

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

Gardin
Posts: 31
Joined: Fri Dec 13, 2019 4:53 pm

Re: FreeRtos Task Notifications and queues.

Postby Gardin » Wed Mar 18, 2020 5:16 pm

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:

Who is online

Users browsing this forum: No registered users and 124 guests