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.

XDC runtime error

Other Parts Discussed in Thread: MSP430F5438, SYSBIOS

HI people,

i am currently in process of wirting driver for IR module which i am using TSOP38438 as IR receiver and Msp430f5438 USCI UART in IrDA mode.

when i configure the HWI for USCI A1 RXD pin it is not giving any error during compilation but, it is printing 

xdc.runtime.Error.raise: terminating execution.

during runtime and stops.

THANK YOU IN ADVANCE.

  • Hi Sunil,

    Its not clear to me what exactly is failing. Can you look at the callstack in the debug window and determine which function called xdc_runtime_Error_raise() ? I think it would also be worth looking at the callstack for each of the tasks in the ROV Task view.

    Best,
    Ashish
  • the program is going into infinite loop from this Sysmin.c
  • one thing i can say is when it is coming to hwi then only it is printing this xdc runtime error.
  • [code]
    TI MSP430 USB1/MSP430 (Suspended)
    abort() at exit.c:93 0x01A562
    xdc_runtime_System_abort__E(unsigned char *)() at System.c:100 0x01A1CA
    xdc_runtime_Error_policyDefault__E(struct xdc_runtime_Error_Block *, unsigned int, unsigned char *, int, unsigned long, long, long)() at Error.c:165 0x014404
    xdc_runtime_Error_raiseX__E(struct xdc_runtime_Error_Block *, unsigned int, unsigned char *, int, unsigned long, long, long)() at Error.c:114 0x0194C2
    xdc_runtime_Assert_raise__I(unsigned int, unsigned char *, int, unsigned long)() at Assert.c:34 0x0180DC
    ti_sysbios_gates_GateMutex_enter__E(struct ti_sysbios_gates_GateMutex_Object *)() at GateMutex.c:101 0x014BB6
    ti_sysbios_BIOS_rtsLock__I() at WRC_MSP430F5438_pe430X.c:2,905 0x019B24
    HOSTwrite(int, unsigned char *, unsigned int)() at trgdrv.c:199 0x017E7E
    xdc_runtime_SysMin_output__I(unsigned char *, unsigned int)() at WRC_MSP430F5438_pe430X.c:2,771 0x019990
    xdc_runtime_SysMin_flush__E() at SysMin.c:115 0x0184D0
    <...more frames...>
    [code\]
    so where am i wrong.
    the whole program will work fine untill it is going into hwi.
    once it goes to hwi it is giving xdc.runtime.error raise : terminating execution
  • the purpose of the code is to continuously receive ir data.
    which means it should continuously jump to the hwi.
  • Hi Sunil,

    From the callstack it looks like an assert in GateMutex_enter() is getting triggered. This can happen if there is a System_printf()/System_flush() call in a Hwi. Do any of your Hwis have printf or flush calls ?

    Best,
    Ashish
  • Yes i do have both 

    System_printf();

    and

    System_flush();

    in hwi.

    and i even tried this by replacing

    BIOS.assertsEnabled = true;

    with 

    BIOS.assertsEnabled = false;

    and it is working properly now.

  • Hi Sunil,

    It is considered a bad idea to call System_printf()/System_flush() within a Hwi/Swi as it calls GateMutex_enter() which is a blocking call. We dont want a Hwi/Swi to block.

    If System_printf() needs to be used, then SysMin should be plugged in as the System provider/proxy. Even then only System_printf() can be called from a Hwi/Swi. It is still bad to call System_flush() from a Hwi/Swi.

    I see that you are already using SysMin so that is good, you can call System_printf() from Hwi/Swi. I think you should remove System_flush() call from the Hwi and move it to any Task function to fix the problem.

    Here's a nice wiki page on this topic that may be useful: processors.wiki.ti.com/.../GateMutex_Assert

    Best,
    Ashish

  • Thank you ashish,
    i have one more question about this.

    here without System_flush();
    the system_printf(); won't work at all.
    so what would be the solution for this.
  • Hi Sunil,

    You can flush the buffer (i.e. call System_flush()) within any Task function. Maybe idle function if the application is not printing a lot and the CPU load is low enough causing the Idle function to get called frequently. Depending on how much data the app prints and how frequently the flush is called, you will need to adjust the SysMin buffer size so as to make sure the buffer does not overflow before it is flushed.

    Best,
    Ashish
  • Thank YOU it helped me a lot