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

RTX - os_evt_get trouble

Hi,

I'm working with MDK_ARM V4.00

I would like to use os_evt_get to identify the current event in a task and I've obtained a strange result !

My source is :

EvtFlag_T1 = os_evt_get() ;

result = os_evt_wait_or (0x0040 | 0x4000, 20);
if ( OS_R_TMO == result )
{ ErrTimeout++ ;
} else
{ NoErrTimeout++ ;
}

/* Wait now for 50 ms */
os_dly_wait (5);

EvtFlag_T1 = os_evt_get() ;

With this source I'm obtaining the follwing results
First call at os_evt_get() function EvtFlag_T1 is set to 0
I'm waiting events 0x0040 and 0x4000. Thess events are not post by my application so os_evt_wait returned to me a timeout error
Second call at os_evt_get(), EvtFlag_T1 is set to 0x4040

Strange, I'm obtaining the event I'm Waiting not the current event of a task. Bug ? or not. Could you help me? thank.

I try the same example with MDK-ARM 322 and MDK-ARM 4.02. I obtained the same result

regards

0