from 《Mastering the FreeRTOS™Real Time Kernel.pdf》
“Software timer callback functions execute from start to finish, and exit in the normal way. They
should be kept short, and must not enter the Blocked state.
Note: As will be seen, software timer callback functions execute in the context of a task that is
created automatically when the FreeRTOS scheduler is started. Therefore, it is essential that
software timer callback functions never call FreeRTOS API functions that will result in the
calling task entering the Blocked state. It is ok to call functions such as xQueueReceive(), but
only if the function’s xTicksToWait parameter (which specifies the function’s block time) is set
to 0. It is not ok to call functions such as vTaskDelay(), as calling vTaskDelay() will always
place the calling task into the Blocked state. ”
this words says no delay allowed in daemon task.I need some work in daemon task for save RAM,and
these work may use like this:
vTaskSuspendAll();
/* do work */
xTaskResumeAll();
or like this:
if(xQueueRecieve(xQueueHandle, &msg, 15) == pdPASS)
{
/*do work*/
}
else
{
/* do process */
}
Are these opration banned by FreeRTOS or not recommend?