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.

TMS320F28069M: Unplugged Interrupt Fault

Part Number: TMS320F28069M
Other Parts Discussed in Thread: SYSBIOS

I am using HRCAP3 as an interrupt for determining when pin 51 is high or low. When I apply GND to that pin I get the following error code and the program stops executing.

ti.ti.sysbios.family.c28.Hwi: line 1032: E_unpluggedInterrupt: Unplugged interrupt flagged: intr# 19
xdc.runtime.Error.raise: terminating execution

This is what my interrupt looks like for HRCAP3. What am I doing to cause this?

//-----------------------------------------
//  ======== SWGInput4HWI ========
//-----------------------------------------
Void SWGInput4HWI()
{
//    unsigned char SWGInput4 = 1;

    GpioDataRegs.GPBTOGGLE.bit.GPIO34 = 1;             // toggle LED9 using "TOGGLE" (1 = ON)

    EALLOW;
      HRCap3Regs.HCCTL.bit.FALLINTE = 0;                // Disable falling edge interrupts
      HRCap3Regs.HCCTL.bit.RISEINTE = 0;                // Disable rising edge interrupts
//      GpioDataRegs.GPBTOGGLE.bit.GPIO39 = 1;             // toggle ON LED10 using "TOGGLE" (1 = ON)

      if( GpioDataRegs.GPBDAT.bit.GPIO56 )
          SWGInput4 = 1;
      else
          SWGInput4 = 0;

      Mailbox_post(SWGInput4Update, &SWGInput4, BIOS_NO_WAIT);

      HRCap3Regs.HCICLR.all = 0x001F;          // Clear all HRCAP interrupts
      HRCap3Regs.HCCTL.bit.FALLINTE = 1;       // Re-enable falling edge interrupts
      HRCap3Regs.HCCTL.bit.RISEINTE = 1;       // Re-enable rising edge interrupts
      HRCap3Regs.HCICLR.bit.INT=1;             // Clear HRCAP interrupt flag
      PieCtrlRegs.PIEACK.bit.ACK4=1;           // Acknowledge PIE Group 4 interrupts.
    EDIS;
}

  • Andrew,

    Can you share the code how you configure the HRCAP interrupt?

  • void HRCap3_Config(void)
    {
        InitHRCap3Gpio();
    
        EALLOW;
        HRCap3Regs.HCCTL.bit.SOFTRESET = 1;
        HRCap3Regs.HCCTL.bit.HCCAPCLKSEL = 1;  // HCCAPCLK = PLL2CLK x 2
        HRCap3Regs.HCCTL.bit.RISEINTE = 1;     // Enable Rising Edge Capture Event Interrupt
        HRCap3Regs.HCCTL.bit.FALLINTE = 1;     // Enable Falling Edge Capture Event Interrupt
        HRCap3Regs.HCCTL.bit.OVFINTE = 0;      // Disable Interrupt on 16-bit Counter Overflow Event
        EDIS;
    }

  • Andrew,

    I am checking with HRCAP expert. We will be able to respond by tomorrow.

    Thanks & Regards,

    Santosh

  • Andrew,

    Can you please elaborate the issue? You have configured the HRCAP to generate an interrupt on a rising/falling edge. When you ground the pin, a falling event probably happens and hence it gets an interrupt. Is this correct? Is the GPIO being pulled high or low?

    Also one question, why are you using the HRCAP and not the ECAP?

    Thanks & Regards,

    Santosh

  • What you described is the problem I am having. The GPIO is configured with the internal pull up resistor and when ground is applied it gets pulled low. I am using HRCAP because I am using the XINT and eCAP registers for other inputs.

  • Andrew,

    I am discussing with subject matter experts. I will get back to you by tomorrow.

    Thanks & Regards,

    Santosh

  • Hi Andrew,

    If you put a breakpoint in this SWGInput4HWI() does it hit it or do you get the unplugged interrupt as soon as it's triggered?

    Interrupt #19 is the illegal instruction ISR, so it seems it seems something is causing the the CPU to try to execute some invalid code. Common causes of this can be issues with ramfuncs not being properly copied to RAM or issues like stack overflow or stack corruption. Can you use ROV to check for signs of stack overflow or any other errors?

    Whitney