Using: TWRK60N512, MQX 3.8, IAR EWARM 6.5
I have reduced the timeout to 1 tick and still am not receiving a timeout, task execution stops.
If I set the event from another task all is good, execution continues, so at least I can continue if all is good :smileyhappy:
I have called _time_delay_ticks and I do in fact delay for the number of ticks, so I am assuming the timer is running properly.
The code is very stright forward:
if ( _lwevent_wait_ticks(&mEvent1, 0x01, TRUE, 1) != MQX_OK )
Any thoughts are appreciated.
已解决! 转到解答。
Hi,
We used the _lwevent_wait_ticks() feature in demo apps we created for ESC. Search freescale.com:
Build Your Own Embedded System (BYOES) – 2012
check out <mqx directory>\demo\k70-hvac_lab2\HVAC_Task_Final.c.
/* Wait for parameters to change or timeout before continuing loop */
_lwevent_wait_ticks(&HVAC_Params.Event, HVAC_PARAMS_CHANGED, TRUE, HVAC_CONTROL_CYCLE_IN_TICKS);
Should not have to poll the function. Just need to call it once and it will wait for event to set or timeout to expire.
Best of luck,
Mac
Thanks for the information.
Had a look. My implementation appears fine. The events are working, they will wait to be set from another task, they just never timeout if they are not set. Seems strange. Maybe is time to use the "heavy weight" events.