I have created this function to get the semaphore:
unsigned char getSemaphoreSPI(void)
if(xSemaphoreSPI != NULL)
if( xSemaphoreTake( xSemaphoreSPI, ( portTickType ) 10000 ) == pdTRUE ) // try to take the sem., block max. 10sec
I have 3 different tasks that try to take this semaphore, it is possible that they come all at the same time.
Is there a limit on the number of tasks that are requesting a mutex?