This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

event pend behavior is suspicious

Dear TI experts,

I am using TIVAC - TM4C129Xl with TIRTOS (tirtos_tivac_2_00_01_23) from TI.

Here I have issue in using events and tasks. I have created 2 task & 2 event handles.

based on predefined conditions in my logic, I am posting event from 1st task to 2nd task and 2nd to first task alternately.

Both the tasks are kept in BIOS_WAT_FOREVER until it receives a valid event.


Some time,  Event_pend() call will not rcv any events even though I post a valid event from Task-1. Due to this My program goes for a hang state since previous Event is not precessed.

Please help me out here !

Thanks

  • Ravikiran,

    There could be multiple reasons for this. Can I see the snippet of code where you create the events and the code where you pend and post the event.

    Are you seeing this sometimes or every time?

    Thanks,

    Moses

  • Hi Moses Isang,

    Please find the code snippet below.

    behavior is consistent & observed more often when I post the event continuously. I.e. I am trying to post about 10 events per second approx.

    Thanks.

    One behavior observed is 1st event always reaches the receiver, but subsequent events I can't rely on !!

    void  Tsk1(void)
    {
        int events ;
        //unknown issue !! EVENT_PEND fails
        events = Event_pend(Fw_Event, Event_Id_NONE,                         \
                    JUNK_EVENT, BIOS_WAIT_FOREVER);

        if(events & JUNK_EVENT)
        {

        }
    }

    void  Tsk2(void)
    {
        int events ;


     Event_post(Fw_Event,JUNK_EVENT)
    }

  • Ravikiran,

    I still don't have enough information. This snippet of code looks fine. Set breakpoints on both the pend and post and verify that it hits the pend, and then the post  the first time. And from the second time it pends(when it stops working) verify that it hits the Event_post. If it does hit the Event_post, step over it and validate with ROV(Event module, Basic view) that the event was posted. Also make sure that pending task is listed on the pended task column. It might help if you send me before and after pend and post screen shots of ROV like this.

    Moses