How run a FreeRTOS task at a specific hertz
Posted: Mon Jan 31, 2022 10:11 am
I'm new to programming and electronics in general. I want run a task at 100 Hz. Unfortunately I don't know how to do that with FreeRTOS, if anyone could help it would be very helpful.
Thank you.
Code: Select all
void Task1code( void * parameter ){
Serial.print("Task1 running on core ");
Serial.println(xPortGetCoreID());
for(;;){
// some code
// Pause the task for 500ms
vTaskDelay(500 / portTICK_PERIOD_MS); // I guess this is something I need to change?
}
}