FreeRTOS Scheduling question

e12 wrote on Wednesday, July 27, 2016:

I have question about freertos scheduling I’m using iar compiler and stm32f427
scheduling method is preemptive, I‘m using the hal library

Current Task are defined as follows:

As shown in Figure SDCARD_WRITE_Task is run every 80ms using vTaskDelayUntil :

As shown in Figure ISS2OFP_Run_Task is run every 4ms using vTaskDelayUntil
and semaphore give to OFP2CLAW_Run_Task run every 8ms, OFP2CLAW_Run_Task semaphore give to CLAW_Run_Task, CLAW_Run_Task semaphore give to CLAW2OFP_Run_Task :

**My question this if SDCARD_WRITE_Task execution time 200ms, Is there any impact to other task ? **

is there any problem with scheduling?

rtel wrote on Wednesday, July 27, 2016:

The question “is there any problem with scheduling?” is not clear, but
given the following description, you should be able to determine how
your tasks will be scheduled. Further you can visualise the scheduling
pattern using the FreeRTOS+Trace tool (

If you are using pre-emptive scheduling (as you say you are) then the
task selected to run by the FreeRTOS scheduler will always be the
highest priority task that is able to run. A task is able to run if it:

  • is not in the Blocked state waiting for an event (message to arrive on
    a queue, direct to task notification, etc.) or a timeout.
  • is not in the Suspended state.

If there are more than one tasks at the highest priority that is able to
run, then the task that has been waiting to run the longest will be
selected. Then, if configUSE_TIMESLICING is set to 1 (or just not
defined, in which case it will default to 1), tasks or equal priority
will be selected in turn on each tick interrupt…but as soon as a
higher priority task because able to run the scheduler will switch to
that higher priority task.