Hi George,
I think the lwevents with one mask for multiple tasks is what is making it difficult.
Attached is example that works with auto clear or manual clear.
I used the lwevent example in the MQX_4.2 as a starting point.
Note it is not humming along at 17msec but is using the 1 second timeout in the example.
I added two more task: hello_task and world_task.
At top of lwevent.c file you can switch between using auto clear or manual using:
| #define LWEVENTAUTOCLEAR 0 | | | //DES 1=use auto clear, 0=manual clear |
Each task is waiting for a different bit in the lwevent mask and the isr is setting the mask to "7".
"service_task" waits for bit 1.
"hello_task" waits for bit 2.
"world_task" waits for bit 4.
If I had all the task waiting on just "1" I saw your results. If I switched to using manual lwevent clearing, then it would work OK.
Regards,
David