We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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);
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
I would have expected result of os_evt_get to be valid (only) if os_evt_wait_or returned OS_R_EVT and would have coded as that. As indicated by the Keil example.
The os_evt_get() is valid only for OS_R_EVT return value from os_evt_wait_or(). On timeout, the value of os_evt_get() is undefined.
Thanks you for all