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


bug in cmsisOS api wrapper for FreeRTOS

Posted by baduf on February 11, 2015

STM32Cube from ST micro provides project code generation for FreeRTOS along with a wrapper dedicated to use of the CMSIS-OS API. Nevertheless, it seems that this wrapper is brocken regarding the FreeRTOS API function "vTaskDelayUntil()" wich is wrapped to "osDelayUntil()" according to the following code from cmsisos.c: ~~~~~~ /** * @brief Delay a task until a specified time * @param PreviousWakeTime Pointer to a variable that holds the time at which the * task was last unblocked. * @param millisec time delay value * @retval status code that indicates the execution status of the function. */ osStatus osDelayUntil (uint32t PreviousWakeTime, uint32_t millisec) {

if INCLUDE_vTaskDelayUntil

portTickType ticks = (millisec / portTICKRATEMS); portTickType previouswake = (portTickType) PreviousWakeTime; vTaskDelayUntil(&previouswake, ticks ? ticks : 1);

return osOK;


(void) millisec; (void) PreviousWakeTime;

return osErrorResource;


} ~~~~~~

In the freeRTOS API, the first argument of this function is a pointer to a variable that holds the time at which the task was last unblocked and this variable is automatically updated within vTaskDelayUntil(). Nevertheless, as you can note, the wrapper don't use a pointer anymore. That is, the local variable couldn't be updated anymore and the function is unusable.

I'm not sure that it is the right place for reporting it, but I don't know where to do so...

Many thanks in advance for your help.

Best regards,


bug in cmsisOS api wrapper for FreeRTOS

Posted by rtel on February 11, 2015

Thanks for reporting this - we have not been involved in creating the wrapper but I will bring it to ST's attention for you.


[ 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