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 error

Other Parts Discussed in Thread: SYSBIOS

hi

I was using

ui_check = event_pend(Event_Id_NONE, Event_Id_00,TIMEOUT);

there were no compile time errors , However during runtime the following error popped up

 " ti.sysbios.knl.Event: line 208: assertion failure: A_eventInUse: Event object already in use.

xdc.runtime.Error.raise: terminating execution "

I tried changing the or mask event id ...still the same error showed up.

Can anyone help ?

(im using sys/bios version bios_6_31_04_27 on evmc6678 platform )

Regards

Shrish

  • This assert is saying that there is another Task in the system already waiting (pending) on the same Event, which is not supported. Only one task can wait on the same event at a given time.

    Mark

     

  • hi  Mark,

    Thanks for the reply ,

    In my code one function pends on an event and another function posts an event (same event id) .. there are no other event pends anywhere else.

    Is is necessary that event pend and post must happen within a "task" only ... in my code the event pend is happening in a function ..not task .

     

    Regards,

    Shrish

     

  • Shrish,

    I am not sure what you mean by a function. In SYS/BIOS, all code runs in a specific context: Task, Swi, Hwi, Idle. Your function is running in one of these contexts. Since Events are blocking, you should only call Event_pend() from Task contexts. Have you seen the Event section in the SYS/BIOS User's Guide (Section 4.2)?

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_32_05_54/exports/bios_6_32_05_54/docs/Bios_User_Guide.pdf

    There is also an example in <path-to-your-sysbios-install>/packages/ti/sysbios/examples/generic/event

    Mark

     

  • Hi Mark,

    Thanks for the reply,

    I will try to correct my code based on the examples...

    I will verify once it is working.

     

    Regards

    Shrish