This video presentation is the eigth installment of the Essentials of MQX RTOS Application Development training course. In this session, you will be introduced to light weight timers, timer queues, and the timer task.
This training was created by Embedded Access Inc., a Freescale sponsored training provider and proven partner.
|Session 8 Course Line
First, watch the video for Session 8: Light Weight Timers.
Then, follow through with the interactive lab assignment below.
Though timers can be used in a great variety of ways, in this lab we'll implement a fairly straight forward, but typical, use case for a timer. A light weight timer will be used to periodically inform the Input Task of when to read the ADC and send a message to the Health Task. In keeping with our philosophy of keeping ISRs short, the timer ISR we implement will leverage the event group that was implemented in the lab for the previous session.
The objective of this lab is to learn about lwtimers by having the input task respond to an event that is periodically generated by a lwtimer.This objective will be accomplished by:
New functions/structures you will use:
LWTIMER_PERIOD_STRUCT, LWTIMER_STRUCT, _lwtimer_create_periodic_queue, _lwtimer_add_timer_to_queue
Need more help? The full source code for this lab can be found in the 'Lab Source Code' folder here.