portYIELD macro

Where I can find documentation or some explanation about portYIELD macro?


In the docs FreeRTOS - Task Control Functions and Macros for the Free Open Source RTOS FreeRTOS
or search the forum
portYIELD() in preemptive mode - #2 by system

portYIELD() forces a context switch, but if the task calling yield is the highest priority task in the system it will run again immediately as you have not asked it to block, therefore the idle task will never execute. Try using vTaskDelay(1) instead. This will block the calling task until the next tick.

and/or lookup the FreeRTOS sources or just ask :slight_smile: