FreeRTOS Quick Reference Guide
This contains examples of the most common functions, designed to jog your memory when writing FreeRTOS code.
|GENERAL TASK MANIPULATION|
|Will block current task for 200ms.|
|Stops scheduler, but not interrupts. Do not call non-interrupt FreeRTOS API from within a suspend section.|
|Used to create a software timer, based of the system ticks. |
|Writes a task list to a debug buffer. Recommended to have about 40 bytes of space in the buffer per task.|
|Returns system debug information for 5 tasks (function added in v7.5.0). Stores total run time into 3rd argument.|
|Creates a queue of length 50 (elements) and width 2 (bytes).|
|Puts item onto the end of the queue. Standard way of putting data onto queue.|
|Use for mutual exclusion (to prevent contention problems).|
|Creates a mutex.|
|Creates a binary semaphore. Use for interrupt-to-task synchronisation|
|Creates a counting semaphore which counts to 10, and starts counting from 0 (so 10 free at creation).|
|Gives a semaphore.|
|Interrupt safe version of xSemaphoreGive().|
tskIDLE_PRIORITY - Priority of the idle task. Usually used as a way of setting the priority of other tasks relative to the idle task (e.g. tskIDLE_PRIORITY + 1).
portTICK_RATE_MS - Period of the ticks (in milli-seconds). Used when calling timing/delay functions so that you can specify a delay in ms rather than ticks
This work is licensed under a Creative Commons Attribution 4.0 International License .