No timeout received from _lwevent_wait_ticks

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

No timeout received from _lwevent_wait_ticks

跳至解决方案
2,680 次查看
jlag
Contributor II

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.

0 项奖励
回复
1 解答
2,036 次查看
jlag
Contributor II

All fixed, it was an implimentation issue in an event abstraction module I ported. Porting is so much fun.

Thank you all for the clues and sorry for the time waste.

Cheers.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
2,036 次查看
macl
Senior Contributor I

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

0 项奖励
回复
2,036 次查看
jlag
Contributor II

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.

2,036 次查看
JuroV
NXP Employee
NXP Employee

What is running at what priority when your task is waiting for event?

2,037 次查看
jlag
Contributor II

All fixed, it was an implimentation issue in an event abstraction module I ported. Porting is so much fun.

Thank you all for the clues and sorry for the time waste.

Cheers.

0 项奖励
回复
2,036 次查看
billnd
Contributor IV

John,

What exactly do you mean by "an implimentation issue in an event abstraction module"? I'm having the symptoms as you report, and wondering if I have a similar cause.

Cheers,

Bill

0 项奖励
回复