Hi,
I have a number of tasks and I am trying to synchronise one of them with another.
I am using the ST Cube tool to create the base code, and it starts all the tasks at boot time.
I therefore, within the first task issue a vTaskSuspend(TIMER_TaskHandle); call. I was hoping that this would allow the second task to complete initializing some hardware (that takes a variable amount of time).
I then, from the second task issue a vTaskResume(TIMER_TaskHandle);
But, the first task does not continue after the suspend line.
Code fragment :-
Timer task:
TIMER_Task_Suspended = TRUE;
vTaskSuspend(TIMER_TaskHandle); // Stop here until allowed to resume...
TIMER_Task_Suspended = FALSE; <- Never reached :(.....
Supervisor task :
if(MODE_DC == my_mode) <- This is true...
{
vTaskResume(TIMER_TaskHandle); // Re start the timer task.
}
So, Firstly, is what I am doing correct and allowed, and secondly, if it is, why does it not appar to work ?.
Thanks,
Andy Pevy