Hi, I writing a new app based on the new Keil 5 CMSIS-RTOS Version 1.02, I wanted to be able to suspend and resume a task, several times in another task,
I have used osThreadTerminate for suspending and I'm using osThreadCreate for resuming, But the problem with that is I'm making several copy Tasks!
Here is the code that I'm using
void enable_alarm(void) { if( t_AlarmTask = osThreadCreate(osThread(AlarmTask), NULL); } void disable_alarm(void) { osThreadTerminate(t_AlarmTask); } void FlasherTask (void const *argument) { while(1) { disable_alarm(); //Do some stuff enable_alarm(); //Do some other things osDelay(1); } }
Do you have any Idea how I should suspend and resume?
If you find that the "CIMCIS RTOS" is not suitable for your requirements, find another one which is!
You did check the specifications before using it, didn't you...?