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.

Nonmaskable Interrupt unknown origin

Other Parts Discussed in Thread: TMS320C6678, SYSBIOS

Hello,

I'm trying to develop an application, where I use Sys/bios, to run in a TMS320c6678 in its EVM.

I have a great part programed in assembly and I use most part of registers A and B. The problem is that in some part of the code it happens an interruption that makes the execution jump to "ti_sysbios_family_c64p_Hwi1" (0x00845c20). Finally the application crashes and the console shows the registers state.

I have programed a function to handle the interruption, just to jump to NRP. It works and makes the execution to come back to the correct position. Just before the interruption the some registers change, I think it will help you (ISTB = 0x02117, HPEINT = 0x1). The problem is that many registers are changed before going in my handle function (A2-3, A8-13, B0-15, not just A10-15, B10-15 and B3) so I don't know how to restore them.

What is happening to me? I'm not sure where this interruption comes from, could you help me? I think this values will help you (ISTB = 0x02117, HPEINT = 0x1).

Thanks and regards.

  • Marcos,

    A jump to "ti_sysbios_family_c64p_Hwi1" signifies that an exception has occured.  If you enable Exception printing in SYSBIOS it will give you some information on approximately where the Exception occured.  You can try to look at the thread below on how to do this.  BIOS does not support return from Exceptions.  In other words, its considered fatal.

    Some additional information.  The NRP register tells you approximately where the Exception occurred.  B3 is the function return ptr.  So using those two pieces of infomation, it can help pin point where the exception happened.

    http://e2e.ti.com/support/embedded/f/355/p/93766/326191.aspx#326191

    Judah

  • Hello Judah,

    I've removed the function to attend the exception and now the error about having gatemutex in a HWI disapears. What I were gotten is this:

    [C66xx_0] ti.sysbios.gates.GateMutex: line 97: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
    [C66xx_0] xdc.runtime.Error.raise: terminating execution

    So now the console prints the registers states and this:

    [C66xx_0] NTSR=0x1000e
    [C66xx_0] ITSR=0x0
    [C66xx_0] IRP=0x0
    [C66xx_0] SSR=0x0
    [C66xx_0] AMR=0x0
    [C66xx_0] RILC=0x0
    [C66xx_0] ILC=0x0
    [C66xx_0] Exception at 0x80e60c
    [C66xx_0] EFR=0x2 NRP=0x80e60c
    [C66xx_0] Internal exception: IERR=0x10
    [C66xx_0] Resource conflict exception
    [C66xx_0] ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x00000000, sp = 0x00000000.
    [C66xx_0] xdc.runtime.Error.raise: terminating execution

     

    I already knew where the exception occurs but it doesn't have sense to me. The exception occurs in a part of asm code where I'm implementing a signal filtering. The question is that the code where the exception occurs is not a critical instruction, it's just a quad multiplication

    0080e60c:   1A5A8799           DADDSP.L1       A21:A20,A23:A22,A21:A20
    0080e610:   1A5A879B ||        DADDSP.L2       B21:B20,B23:B22,B21:B20
    0080e614:   0E670E19 ||        ADDSP.S1      A24,A25,A28
    0080e618:   006C08F3 ||        MV.D2         B27,B0
    0080e61c:   E0200003           .fphead       n, l, W, BU, nobr, nosat, 0000001b
    0080e620:   0EFC1022 ||        BDEC.S2       loopA (PC-128 = 0x0080e5a0),B29

    and if I remove the first parallel instruction the exception occurs in the following (that would be in the same memory direction). However, if I put a nop instruction the error happens in the following direction. That's why I first thought that this exceptions come from other part of the code or from the hardware.

    Does it help you? By the way, what's the .fphead instruction in the disassembled code that I didn't put there?

    Regards.

  • Marcos,

    It states that you are getting a "Resource conflict exception".  Typically this means in the same cycle, two instructions are writing to the same register.

    The NRP = 0x80e60c, doesn't mean this instruction caused the exception.  What it does mean is the exception occured close to this instruction, probably a few cycles before it and then it finally branched to the NMI vector at this instruction.  My best guess is...look a few instructions before this address to see if there's something obvious going on with your register usage that is conflicting.

    .fphead is called the packet header.  This is how the c64x+ instruction set can be compacted.

    Judah

  • Hello Judah,

    thanks to you I finally found the problem. I am not attemping to write in the same register at the same time but I'm trying to make a functional unit to write in two different registers at the same time. So the solution is more or less easy and I fixed it.

     

    Thak you very much Judah.

    Regards.