Freertos queue demo msp430

reference code:FreeRTOSV8.2.3\FreeRTOS\Demo\CORTEX_M4F_MSP432_LaunchPad_IAR_CCS_Keil\SimplyBlinkyDemo


main_blinky() creates one queue, and two tasks. It then starts the  Scheduler. Create a queue, two tasks

The Queue Send Task:Delay 200ms Send a message  The queue send task is implemented by the prvQueueSendTask() function in  This file. prvQueueSendTask() sits in a loop that causes it to repeatedly  Block for 200 milliseconds, before sending the value 100 to the queue that  Was created within main_blinky(). Once the value is sent, the task loops  Back around to block for another 200 milliseconds.

The Queue Receive Task:Wait to receive a message, if a message is received, the task checks whether the value of the message is equal to 100. Then switches the state of the LED.

The queue receive task is implemented by the prvQueueReceiveTask() function in this file. prvQueueReceiveTask() sits in a loop where it repeatedly blocks on attempts to read data from the queue that was created within main_blinky(). When data is received, the task checks the value of the data, and if the value equals the expected 100, toggles the LED. The ‘block time’ parameter passed to the queue receive function specifies that the task should be held in the Blocked state indefinitely to wait for data to be available on the queue. The queue receive task will only leave the Blocked state when the queue send task writes to the queue. As the queue send task writes to the queue every 200 milliseconds, the queue receive task leaves the Blocked state every 200 milliseconds, and therefore toggles


(Add later)