scheduling semaphore and vTaskDelayUntil

e12 wrote on Tuesday, July 12, 2016:

I have question about freertos schedulings I’m using iar compiler and stm32f427
scheduling method is preemptive, I‘m using the hal library and the contents of FreeRTOSConfig.h are as follows:

#define configUSE_PREEMPTION                     1
#define configUSE_IDLE_HOOK                      0
#define configUSE_TICK_HOOK                      0
#define configCPU_CLOCK_HZ                       ( SystemCoreClock )
#define configTICK_RATE_HZ                       ((TickType_t)1000)
#define configMAX_PRIORITIES                     ( 30 )
#define configMINIMAL_STACK_SIZE                 ((uint16_t)128)
#define configTOTAL_HEAP_SIZE                    ((size_t)30720)
#define configMAX_TASK_NAME_LEN                  ( 30 )
#define configUSE_TRACE_FACILITY                 1
#define configUSE_16_BIT_TICKS                   0
#define configIDLE_SHOULD_YIELD	       	         1  // Updated 2016.06.17
#define configUSE_MUTEXES                        1
#define configQUEUE_REGISTRY_SIZE                8
#define configCHECK_FOR_STACK_OVERFLOW           2
#define configUSE_RECURSIVE_MUTEXES              1
#define configUSE_MALLOC_FAILED_HOOK             1
#define configUSE_COUNTING_SEMAPHORES            1
#define configUSE_TASK_NOTIFICATIONS			 1	 // Updated 2016.06.17
#define configUSE_TICKLESS_IDLE					 0	 // Updated 2016.06.17

Current Task are defined as follows:

void Task_Create(void)
  xTaskCreate( ISS2OFP_Run_Task, "task_ISS2OFP", configMINIMAL_STACK_SIZE*2, NULL, 19, NULL );
  xTaskCreate( OFP2CLAW_Run_Task, "task_OFP2CLAW", configMINIMAL_STACK_SIZE, NULL, 18, NULL );
  xTaskCreate( CLAW_Run_Task, "task_CLAW", configMINIMAL_STACK_SIZE*2, NULL, 17, NULL );
  xTaskCreate( CLAW2OFP_Run_Task, "task_CLAW2OFP", configMINIMAL_STACK_SIZE, NULL, 16, NULL );
  xTaskCreate( OFP2GCS_Run_Task, "task_OFP2GCS", configMINIMAL_STACK_SIZE*2, NULL, 13, NULL );

  xTaskCreate( SDcard_Recode_Queue_Task, "SDcard_Recode_Queue", configMINIMAL_STACK_SIZE*2, NULL, 11, NULL );
  xTaskCreate( OFP2FDR_Run_Task, "task_OFP2FDR", configMINIMAL_STACK_SIZE*6, NULL, 10, NULL );
  xTaskCreate( SYSTEM_Process_10ms_Task, "SYSTEM_Process_10ms", configMINIMAL_STACK_SIZE*2, NULL, 7, NULL );
  xTaskCreate( SYSTEM_Process_1ms_Task, "SYSTEM_Process_1ms", configMINIMAL_STACK_SIZE*2, NULL, 6, NULL );

there are several task using semaphore like, ISS2OFP_Run_Task, OFP2CLAW_Run_Task, CLAW_Run_Task, CLAW2OFP_Run_Task on the other hand there are some task using vTaskDelayUntil like SDcard_Recode_Queue_Task, OFP2GCS_Run_Task, GCS2OFP_Run_Task, SYSTEM_Process_1ms_Task, SYSTEM_Process_10ms_Task

My question this, can I use vTaskDelayUntil and semaphore task at the same time?

is there any problem with scheduling?

rtel wrote on Tuesday, July 12, 2016:

There are no interdependencies between different features - all the API
functions work as documented. For example, if a task calls vTaskDelay(
100 ) then it will enter the Blocked state and leave the Blocked state
100 ticks later, whether or not the task is using any other feature of
the OS. Likewise if a task calls xSemaphoreTake( semaphore_handle, 100
) when the semaphore is not available it will enter the blocked state
until either the semaphore becomes available or 100 ticks pass without
the semaphore becoming available (it times out) no matter what other API
function the task is using.