Tool/software: TI-RTOS
Hi guys.
I have a task that does some stuff and then goes to sleep for some time
// by default is set to 30' int32_t timeInterv = 1800000; void Task1( void *pvParameters ){ . . . while(1){ . . . // goes to sleep osi_Sleep(timeInterv); } }
The other task is running and may alter the "timeInterv" variable.
void Task2( void *pvParameters ){ . . . while(1){ . if(...){
timeInterv = 60000;
} . // goes to sleep for 5ms osi_Sleep(5); } }
The problem is that Task1 is sleeping and will update "timeInterv" only when it wakes-up after the first 30'.
I want it to wake-up and refresh the sleeping time when it is updated.
I also thought about killing the task and create it again, so the sleeping time would be the new one...any suggestions?
Thanks in advance.