Passing parameters to a thread functions

Good Day! I’m fairly new to FreeRTOS and the ST platform, whilst going through the FreeRTOS hands on Tutorial guide, I found a way to pass arguments to a thread function like so:

xTaskCreate( vTaskFunction, "Task 2", 1000, (void*)pcTextForTask2, 1, NULL );
Where pcTextForTask2 is the parameter passed.

But the CMSIS OSAL doesn’t let me do it. Going through the STM “Developing applications on stm32cube with rtos” document did not reveal anything either.

Is there a way to have this functionality with CMSIS v1.

Any help would be great!

Cheers.

You can just call the native FreeRTOS API directly - that is what the CMSIS wrapper does internally.

1 Like