No timeout received from _lwevent_wait_ticks

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No timeout received from _lwevent_wait_ticks

Jump to solution
1,476 Views
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 Kudos
1 Solution
832 Views
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.

View solution in original post

0 Kudos
5 Replies
832 Views
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 Kudos
832 Views
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.

832 Views
JuroV
NXP Employee
NXP Employee

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

833 Views
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 Kudos
832 Views
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 Kudos