I am a beginner looking for information on build what I interested and use FreeRTOS.
I would like to consult receive and send the timer task's data.
And would like to help guide me how to do it. I have watched several video tutorials.
But still not sure which way to do it, type A or B that is possible.
How do I use a timer in FreeRTOS for traffic?
-
- Posts: 94
- Joined: Tue Sep 07, 2021 12:07 pm
Re: How do I use a timer in FreeRTOS for traffic?
I'm not sure what those pictures mean. What are you trying to create?
I think you want to look at tasks, semaphores, and interrupt handlers.
Start simple: make a timer-driver interrupt handler that uses a semaphore to release a task that waits for the semaphore. Print a short message from the task each time it is release. Once you see how those three pieces work together, you'll get some ideas for bigger projects with several tasks and several interrupt handlers.
task: while true { wait for semaphore, print "hello" }
handler: signal the semaphore
main: start task, set up timer+handler
I think you want to look at tasks, semaphores, and interrupt handlers.
Start simple: make a timer-driver interrupt handler that uses a semaphore to release a task that waits for the semaphore. Print a short message from the task each time it is release. Once you see how those three pieces work together, you'll get some ideas for bigger projects with several tasks and several interrupt handlers.
task: while true { wait for semaphore, print "hello" }
handler: signal the semaphore
main: start task, set up timer+handler
Craige
Who is online
Users browsing this forum: No registered users and 60 guests