Can't create a second xTaskCreatePinnedToCore()
Posted: Mon Aug 07, 2017 11:29 am
I try to create a Task which is pinned to Core 0, but it fails. My other task works fine.
Here is a code snippet:
Here is a code snippet:
Code: Select all
void task1(void* arg)
{
//This works
}
void task2(const char* data)
{
//This not
}
xTaskCreatePinnedToCore(
task1, /* Function to implement the task */
"task1", /* Name of the task */
8192, /* Stack size in words */
NULL, /* Task input parameter */
1, /* Priority of the task */
NULL, /* Task handle. */
1); /* Core where the task should run */
xTaskCreatePinnedToCore(
task2, /* Function to implement the task */
"task2", /* Name of the task */
8192, /* Stack size in words */
NULL, /* Task input parameter */
2, /* Priority of the task */
NULL, /* Task handle. */
0); /* Core where the task should run */
Is it because of 'const char* data' in my function task2?error: invalid conversion from 'void (*)(const char*)' to 'TaskFunction_t {aka void (*)(void*)}' [-fpermissive]
0); /* Core where the task should run */