This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

keil rtos2 osEventFlagsNew(NULL) problem

Hi

I am working in a project and using  LPC1768 cmcis RTOS2 with KEIL version 5 .

i have several task that works correctly but when I set an os flag in the beginning of a task with   osEventFlagsNew(NULL) the the related task not works .

for better explanation suppose the following task  that works correctly 

__NO_RETURN void  led(void *argument)

{

while(1)
{
 code to blink led every 1 second 
}

}

now suppose the following task 

__NO_RETURN void  led(void *argument)

{
led_id = osEventFlagsNew(NULL);
while(1)
{

osEventFlagsWait(led_id, 0x0001, osFlagsWaitAny, osWaitForever);


 code to blink led every 1 second 
}

but this task will not run at all .

when I connect jlink to cpu  and insert a break point in the line (osEventFlagsWait) that is  waiting for led_id flag set , program will not stop at this line .

what is the reason for this problem ?

i am beginner to RTOS2 , any body knows how to solve this problem ?