Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

scheduling semaphore and vTaskDelayUntil

Posted by e12 on 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 configUSEIDLEHOOK 0
define configUSETICKHOOK 0
define configCPUCLOCKHZ ( SystemCoreClock )
define configTICKRATEHZ ((TickType_t)1000)
define configMAX_PRIORITIES ( 30 )
define configMINIMALSTACKSIZE ((uint16_t)128)
define configTOTALHEAPSIZE ((size_t)30720)
define configMAXTASKNAME_LEN ( 30 )
define configUSETRACEFACILITY 1
define configUSE16BIT_TICKS 0
define configIDLESHOULDYIELD 1 // Updated 2016.06.17
define configUSE_MUTEXES 1
define configQUEUEREGISTRYSIZE 8
define configCHECKFORSTACK_OVERFLOW 2
define configUSERECURSIVEMUTEXES 1
define configUSEMALLOCFAILED_HOOK 1
define configUSECOUNTINGSEMAPHORES 1
define configUSETASKNOTIFICATIONS 1 // Updated 2016.06.17
define configUSETICKLESSIDLE 0 // Updated 2016.06.17
define configNUMTHREADLOCALSTORAGEPOINTERS 3
define configUSESTATSFORMATTING_FUNCTIONS 1

~~~

Current Task are defined as follows: ~~~ void TaskCreate(void) { xTaskCreate( ISS2OFPRunTask, "taskISS2OFP", configMINIMALSTACKSIZE2, NULL, 19, NULL ); xTaskCreate( OFP2CLAWRunTask, "taskOFP2CLAW", configMINIMALSTACKSIZE, NULL, 18, NULL ); xTaskCreate( CLAWRunTask, "taskCLAW", configMINIMALSTACKSIZE2, NULL, 17, NULL ); xTaskCreate( CLAW2OFPRunTask, "taskCLAW2OFP", configMINIMALSTACK_SIZE, NULL, 16, NULL );

xTaskCreate( OFP2GCSRunTask, "taskOFP2GCS", configMINIMALSTACK_SIZE*2, NULL, 13, NULL );

xTaskCreate( SDcardRecodeQueueTask, "SDcardRecodeQueue", configMINIMALSTACKSIZE*2, NULL, 11, NULL ); xTaskCreate( OFP2FDRRunTask, "taskOFP2FDR", configMINIMALSTACKSIZE*6, NULL, 10, NULL );

xTaskCreate( SYSTEMProcess10msTask, "SYSTEMProcess10ms", configMINIMALSTACKSIZE*2, NULL, 7, NULL ); xTaskCreate( SYSTEMProcess1msTask, "SYSTEMProcess1ms", configMINIMALSTACKSIZE*2, NULL, 6, NULL ); } ~~~

there are several task using semaphore like, ISS2OFPRunTask, OFP2CLAWRunTask, CLAWRunTask, CLAW2OFPRunTask on the other hand there are some task using vTaskDelayUntil like SDcardRecodeQueueTask, OFP2GCSRunTask, GCS2OFPRunTask, SYSTEMProcess1msTask, SYSTEMProcess10ms_Task

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

is there any problem with scheduling?


scheduling semaphore and vTaskDelayUntil

Posted by rtel on 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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists