Notification Usage #100
-
Hi Mair, Notification is introduced first and discussed in great details in your FreeRTOS course section. It seems that it can emulate binary/counting semaphore, event flag groups, and queue as long as I am using it for directly communicate from a send task or an ISR routine to a receive task.
Am I correct? Any downside from overusing it? Should I always start with notification as the choice of direct communication between two tasks? Such that I don't need to consider other communication objects like semaphore/event flag groups/queue...except for mutex. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @mightylastingcode
|
Beta Was this translation helpful? Give feedback.
Hi @mightylastingcode
Yes correct.
And to your point about notifications. According the the FreeRtos documentation, notifications are faster then regular semaphores although to be totally honest with you in 99% of my code I use
binary semaphores tend to turn into event notifications as the code gets more complex. For example. I want a notification when I connect to the wireless. This turns into I want an indication when I connect or get an error which turn into I want an indication when I connect, get an error or a time out.