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.

SYS/BIOS zero latency interrupts IER lockup 28069

Other Parts Discussed in Thread: SYSBIOS

SYS/BIOS: 6.33.5.46

Part: Piccolo 28069

IDE: CCS v5.2.1.00018

Compiler: v6.1.0

XDCtools: v3.23.3.53

Board: Piccolo ControlCard w/ added CAN transceiver on breadboard.

Hello,

I'm having issues with a custom build of SYS/BIOS when using zero latency interrupts as well as BIOS controlled interrupts. During execution of code at some point the SYS/BIOS ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable boolean is set to 1 however when looking at the IER register the BIOS controlled pie groups are in fact NOT enabled, the IER is set to my zero latency mask (0x809). This results in BIOS controlled interrupts never being re-enabled.

ti_sysbios_family_c28_Hwi_restore__E is called from the idle task to restore the global interrupts and when the code is run it falls through the conditional and just returns, resulting in the BIOS controlled interrupts not being re-enabled. For reference:

Void ti_sysbios_family_c28_Hwi_restore__E(UInt key)
{
    UInt intmKey;

    if (key == 1 && ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable == 0) {
        ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable = TRUE;
        intmKey  = __disable_interrupts();
        IER |= ti_sysbios_family_c28_Hwi_Module__state__V.shadowIER;
        __restore_interrupts(intmKey);
    }
    else if (key == 0 && ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable == 1) {
        ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable = 0;
        intmKey  = __disable_interrupts();
        IER &= 0x809;
        __restore_interrupts(intmKey);
    }
}

The only BIOS controlled interrupts going off during execution are CAN receive and transmit.

I added some code to the idle task so that I can break when the problem occurs however I'm not sure what to look at as far as finding what is causing this.

Anyone have any ideas?

  • Hi Mike,

    We are investigating this issue now.

    Would you happen to have a simple test case that we could use to reproduce this so we can dig into this deeper?

    Steve

  • Steven Connell said:
    Would you happen to have a simple test case that we could use to reproduce this so we can dig into this deeper?

    Hi Steve,

    Unfortunately the project that I have been using is far from simple. I'll see if I can get something basic going on a ControlCard.

    Mike

  • Steve,

    I haven't been able to make a simple project that demonstrates the issue. However, I'm still working on looking through the SYS/BIOS code and was wondering how I can go about modifying the code that is generated for a custom SYS/BIOS build. More specifically, the (project name)_p28FP.c file that is generated.

  • Hi Mike --

    We looked into this and we think we see the root cause of the problem.   It looks like there's a bug in the disable/enable/restore code in Hwi.xdt.

    Save your copy of Hwi.xdt and apply the following change to Hwi_disable, enable and restore.   You need to change 3 functions, I only show one below,  but the change is similar. 

    I filed SDOCM00095657 to cover this and we'll fix in a release ASAP.

    before:

    /*
     * ======== Hwi_disable ========
     */
    UInt ti_sysbios_family_c28_Hwi_disable__E()
    {
        UInt key;
        UInt intmKey;

        if (ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable == FALSE) {
            key = 0;
        }
        else {
            key = 1;
            ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable = FALSE;

            intmKey  = __disable_interrupts();
            IER &= `Hwi.zeroLatencyIERMaskStr`;
            __restore_interrupts(intmKey);
        }

        return (key);
    }

    after:

    /*
     * ======== Hwi_disable ========
     */
    UInt ti_sysbios_family_c28_Hwi_disable__E()
    {
        UInt key;
        UInt intmKey;

        intmKey  = __disable_interrupts();

        if (ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable == FALSE) {
            key = 0;
        }
        else {
            key = 1;
            ti_sysbios_family_c28_Hwi_Module__state__V.globalEnable = FALSE;

            IER &= `Hwi.zeroLatencyIERMaskStr`;

        }

         __restore_interrupts(intmKey);

        return (key);
    }

  • Perfect. Everything is working as expected now. Thanks for your help.