ARTX - ARM7 - os_evt_set, os_evt_wait_or

Hi,

I'm developping on ARM7 chip with ARTX OS and I would like to implement periodic task. My software is based onto the example you can find at the following link :
http://www.keil.com/support/docs/3008.htm

During my tests, I've detected some troubles with os_evt_set() an os_evt_wait_or() functions.

If a high task priority post two event before the low task take event with os_evt_wait_or(), sometimes this task is waking-up twice as the event have been store !

I don't understand. Could you help me ?

Thanks for all

Parents
  • The os_evt_set() and os_evt_wait() do work properly.

    IF a high priority task calls os_evt_set() twice without doing an os_block at any point, the lower priority task will only wakeup once.

    note:

    1) os_itv_wait() causes an os_block
    2) priorities go from 0 (low priority) to 255 (high priority). This is different than some kernels, but I think it makes more sense.
    3) as soon as the low priority task "takes" the event (returns from the os_evt_wait_or()) the evt is cleared and another one can be received BEFORE you call os_evt_wait_or() again. This means as soon as you call os_evt_wait_or() you may wakeup again.

    The os_evt_wait() does work as advertised and as it should (this does not mean it works in the way you are trying to make it work)

    If you want to post code or describe what you would really like to happen, I would be happy to comment again.

Reply
  • The os_evt_set() and os_evt_wait() do work properly.

    IF a high priority task calls os_evt_set() twice without doing an os_block at any point, the lower priority task will only wakeup once.

    note:

    1) os_itv_wait() causes an os_block
    2) priorities go from 0 (low priority) to 255 (high priority). This is different than some kernels, but I think it makes more sense.
    3) as soon as the low priority task "takes" the event (returns from the os_evt_wait_or()) the evt is cleared and another one can be received BEFORE you call os_evt_wait_or() again. This means as soon as you call os_evt_wait_or() you may wakeup again.

    The os_evt_wait() does work as advertised and as it should (this does not mean it works in the way you are trying to make it work)

    If you want to post code or describe what you would really like to happen, I would be happy to comment again.

Children
More questions in this forum