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.

RTOS/TM4C1294NCPDT: Event post in HWI

Part Number: TM4C1294NCPDT

Tool/software: TI-RTOS

Hi,

/* program */

HWIHandlerFunc()

{

// clearing HWI flag

Led_toggle_0();

Event_post(handler, event id);

}

taskFnx1()

{

while(1)

{

Event_pend(handler, event id, event none, timeout);

Led_toggle_1();

}

}

The above is my code, if I run the code the LED is not toggling and I am not triggering any runtime or complile error,

Question:

1.If Hwi is given, the LED_0 is toggling and not the LED_1.

2.Can I use Event_Post inside HWI?

Regards,

Manohar

  • Manohar B said:
    2.Can I use Event_Post inside HWI?

    The documentation for the module ti.sysbios.knl.Event says yes:

    Calling Context

    FunctionHwiSwiTaskMainStartup
    create N N Y Y N
    Params_init Y Y Y Y Y
    construct N N Y Y N
    delete N N Y Y N
    destruct N N Y Y N
    getPostedEvents Y Y Y Y Y
    pend N* N* Y N* N
    post Y Y Y Y N
    Definitions: (N* means OK to call iff the timeout parameter is set to '0'.)
    • Hwi: API is callable from a Hwi thread.
    • Swi: API is callable from a Swi thread.
    • Task: API is callable from a Task thread.
    • Main: API is callable during any of these phases:
    • In your module startup after this module is started (e.g. Event_Module_startupDone() returns TRUE).
    • During xdc.runtime.Startup.lastFxns.
    • During main().
    • During BIOS.startupFxns.
    • Startup: API is callable during any of these phases:
    • During xdc.runtime.Startup.firstFxns.
    • In your module startup before this module is started (e.g. Event_Module_startupDone() returns FALSE).