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.

NMI Exception



I’m receiving a NMI exception now that I’ve added a second HWI on a custom C6748 board.  The program operated properly using an EMIFA interrupt (selection 55)  tied HWI_INT4 using the dispatcher with an “all” Interrupt mask (I’m also clearing the interrupt after receipt).  I’ve now added a second interrupt (HWI_INT5) tied to the UART Rx interrupt (selection 38) with the dispatcher. The UART read happens first and processes fine and once complete the EMIFA interrupts start and on the second interrupt the NMI exception occurs. When I don’t input anything on the UART Rx the problem does not occur.  I’ve examined the NTSR register is per another posting  (reads 0x0001020F - INT, XEN, GEE, SGE and GIE all 1).  Any suggestions on how to debug this issue?


Thanks,  Dave

  • David,

    What do you mean by "I’m also clearing the interrupt after receipt"? Are you repeating something that the HWI_Dispatcher is already doing?

    Which version of BIOS and CCS are you using?

    There are more registers in the Exception module that you need to look at to determine what has happened. Please refer to the CPU Exceptions section of the C674x CPU & Instruction Set Reference Guide. Especially, the IERR.

    Regards,
    RandyP

  • Randy,

    In order to make the system operate with the EMIFA0 interrupt I had to reset the INTRAW register after the interrupt (and outside the ISR) otherwise no new interrupts were received (see reset code below) .

    #define INTRAW 0x68000040
    uint32_t *intraw = (uint32_t *) INTRAW;
     *intraw = 0x0000004;

    I recently upgraded to CCS Version: 5.3.0.00090 and am using DSP/BIOS version: 5.41.13.32.

    When it fails IERR = 0x00000008, or the  OPX bit which is an opcode exception. It appears to fail near the writing of the INTRAW register. 

    Dave

  • David,

    Instead of going back to the CPU & Instruction Set Reference Guide to find more registers to report, please take a look at the DSP/BIOS 5.x API Reference Guide spru403 (I have rev S today). Appendix C talks about using the DSP/BIOS EXC Module, and it will be able to give you a report on the various registers. You can capture that and paste it into your next reply.

    Also, it may be helpful to show us your disassembler window or an assembly listing for the code around the address of the opcode exception (NRP).

    Regards,
    RandyP

  • Randy,

    I included exc.c into my program and reran the code.  The code now fails after about 600 EMIFA0 interrupts when it previously failed on the second interrupt. 

    I did not see specific registers in  the guide except reference to ( EFR = 0x00000002,   or IXF bit),  ( NRP =0x11827F88),  (NTSR= 0x0001020F) and (IERR = 0x00000008)

    Here is the code around the NRP address. I also included the error log FYI.  Thanks much, Dave

    HWI_F_iexec:
    11827f6c:   04EF                BNOP.S2       B9,0
    11827f6e:   4CF7     ||         SUBAW.D2      B15,0x2,B15
    11827f70:   006803E2            MVC.S2        TSR,B0
    11827f74:   000028F2            OR.D2         1,B0,B0
    11827f78:   0D0003A2            MVC.S2        B0,TSR
    11827f7c:   E1000040            .fphead       n, l, W, BU, nobr, nosat, 0001000
    11827f80:   01BFC42A            MVK.S2        0x7f88,B3
              _HWI_lat2end1:
    11827f84:   0188C16A            MVKH.S2       0x11820000,B3
              doret2:
    11827f88:   178002CA            .word         0x178002ca
              doret2_noPop:
    11827f8c:   02198629            MVK.S1        0x330c,A4
    11827f90:   019A302A ||         MVK.S2        0x3460,B3
    11827f94:   0208C1E9            MVKH.S1       0x11830000,A4
    11827f98:   0188C1EB ||         MVKH.S2       0x11830000,B3
    11827f9c:   00000000 ||         NOP          
              _HWI_lat3beg:
    11827fa0:   040B                BNOP.S2       hwi_disable (PC+32 = 0x11827fc0),0
    11827fa2:   500C     ||         LDW.D1T2      *A4[2],B0
    11827fa4:   000C22E4 ||         LDW.D2T1      *+B3[1],A0
    11827fa8:   00906264            LDW.D1T1      *+A4[3],A1
    11827fac:   00E803E2            MVC.S2        TSR,B1
    11827fb0:   0087C9F2            AND.D2        -2,B1,B1
    11827fb4:   0D0403A2            MVC.S2        B1,TSR
    11827fb8:   0C6E                NOP           1
    11827fba:   0C6E     ||         NOP           1
    11827fbc:   E8209003            .fphead       n, l, W, BU, br, nosat, 1000001

    !ENTRY Rta6Solution/com.ti.bios.rta.RTAServer 4 4 2013-04-07 23:47:56.758
    !MESSAGE RtaServerException
    !STACK 0
    com.ti.dvt.rta.interfaces.IRTAServer$RtaServerException: java.lang.Exception: Failed to find required symbol 'LOG_A_TABBEG'
     at com.ti.bios.rta.RTAServer.getMetaDataObject(Unknown Source)
     at com.ti.bios.rta.RTAServer.getDecoderObject(Unknown Source)
     at com.ti.bios.rta.RTAServer.getStreamCombiner(Unknown Source)
     at com.ti.bios.rta.RTAServer.getDataCollectorObject(Unknown Source)
     at com.ti.dvt.rta.RtaSolution.activate(RtaSolution.java:230)
     at com.ti.dvt.rta.RtaSolution.setActivated(RtaSolution.java:196)
     at com.ti.dvt.rta.actions.DataViewAction$MyActions.attach(DataViewAction.java:179)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at com.ti.dvt.rta.views.TableTreeConfigViewer$TableElement.run(TableTreeConfigViewer.java:415)
     at com.ti.dvt.rta.actions.DataViewAction$StreamAction.forcedRun(DataViewAction.java:101)
     at com.ti.dvt.rta.actions.DataViewAction.setChecked(DataViewAction.java:44)
     at com.ti.dvt.rta.RtaSolution.onProgramLoaded(RtaSolution.java:492)
     at com.ti.dvt.rta.RtaSolutionManager.createSolution(RtaSolutionManager.java:113)
     at com.ti.dvt.rta.DataViewSessionHandler$2.run(DataViewSessionHandler.java:105)
     at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
     at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
     at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
     at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
     at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
     at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
     at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
     at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
     at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
     at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
     at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

    !ENTRY Rta6Solution/com.ti.bios.rta.RTAServer 4 4 2013-04-07 23:48:23.590
    !MESSAGE RTAServerException
    !STACK 0
    com.ti.dvt.rta.interfaces.IRTAServer$RtaServerException: java.lang.Exception: Failed to find required symbol 'LOG_A_TABBEG'
     at com.ti.bios.rta.RTAServer.getMetaDataObject(Unknown Source)
     at com.ti.dvt.rta.RtaSolution.initializeViews(RtaSolution.java:1070)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1267)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1264)
     at com.ti.dvt.rta.RtaSolution.onCpuRunning(RtaSolution.java:589)
     at com.ti.dvt.rta.RtaSolution.access$7(RtaSolution.java:574)
     at com.ti.dvt.rta.RtaSolution$3.onIDECPUEvent(RtaSolution.java:382)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1044)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1019)
     at com.ti.dvt.ideadapter.AbstractIDECPUAdapter.targetRunning(AbstractIDECPUAdapter.java:82)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter.handleSyncEvent(CCStudioIDECPUAdapter.java:358)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter$MyDspUserListener.asyncHandleEvent(CCStudioIDECPUAdapter.java:164)
     at com.ti.dvt.debug.server.extensions.events.AsyncEventJob.run(AsyncEventJob.java:87)
     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    !ENTRY Rta6Solution/com.ti.bios.rta.RTAServer 4 4 2013-04-07 23:48:51.857
    !MESSAGE RTAServerException
    !STACK 0
    com.ti.dvt.rta.interfaces.IRTAServer$RtaServerException: java.lang.Exception: Failed to find required symbol 'LOG_A_TABBEG'
     at com.ti.bios.rta.RTAServer.getMetaDataObject(Unknown Source)
     at com.ti.dvt.rta.RtaSolution.initializeViews(RtaSolution.java:1070)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1267)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1264)
     at com.ti.dvt.rta.RtaSolution.onCpuRunning(RtaSolution.java:589)
     at com.ti.dvt.rta.RtaSolution.access$7(RtaSolution.java:574)
     at com.ti.dvt.rta.RtaSolution$3.onIDECPUEvent(RtaSolution.java:382)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1044)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1019)
     at com.ti.dvt.ideadapter.AbstractIDECPUAdapter.targetRunning(AbstractIDECPUAdapter.java:82)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter.handleSyncEvent(CCStudioIDECPUAdapter.java:358)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter$MyDspUserListener.asyncHandleEvent(CCStudioIDECPUAdapter.java:164)
     at com.ti.dvt.debug.server.extensions.events.AsyncEventJob.run(AsyncEventJob.java:87)
     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    !ENTRY Rta6Solution/com.ti.bios.rta.RTAServer 4 4 2013-04-07 23:48:58.955
    !MESSAGE RTAServerException
    !STACK 0
    com.ti.dvt.rta.interfaces.IRTAServer$RtaServerException: java.lang.Exception: Failed to find required symbol 'LOG_A_TABBEG'
     at com.ti.bios.rta.RTAServer.getMetaDataObject(Unknown Source)
     at com.ti.dvt.rta.RtaSolution.initializeViews(RtaSolution.java:1070)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1267)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1264)
     at com.ti.dvt.rta.RtaSolution.onCpuRunning(RtaSolution.java:589)
     at com.ti.dvt.rta.RtaSolution.access$7(RtaSolution.java:574)
     at com.ti.dvt.rta.RtaSolution$3.onIDECPUEvent(RtaSolution.java:382)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1044)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1019)
     at com.ti.dvt.ideadapter.AbstractIDECPUAdapter.targetRunning(AbstractIDECPUAdapter.java:82)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter.handleSyncEvent(CCStudioIDECPUAdapter.java:358)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter$MyDspUserListener.asyncHandleEvent(CCStudioIDECPUAdapter.java:164)
     at com.ti.dvt.debug.server.extensions.events.AsyncEventJob.run(AsyncEventJob.java:87)
     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    !ENTRY Rta6Solution/com.ti.bios.rta.RTAServer 4 4 2013-04-07 23:49:09.641
    !MESSAGE RTAServerException
    !STACK 0
    com.ti.dvt.rta.interfaces.IRTAServer$RtaServerException: java.lang.Exception: Failed to find required symbol 'LOG_A_TABBEG'
     at com.ti.bios.rta.RTAServer.getMetaDataObject(Unknown Source)
     at com.ti.dvt.rta.RtaSolution.initializeViews(RtaSolution.java:1070)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1267)
     at com.ti.dvt.rta.RtaSolution.run(RtaSolution.java:1264)
     at com.ti.dvt.rta.RtaSolution.onCpuRunning(RtaSolution.java:589)
     at com.ti.dvt.rta.RtaSolution.access$7(RtaSolution.java:574)
     at com.ti.dvt.rta.RtaSolution$3.onIDECPUEvent(RtaSolution.java:382)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1044)
     at com.ti.dvt.ideadapter.IDECPU.fireEvent(IDECPU.java:1019)
     at com.ti.dvt.ideadapter.AbstractIDECPUAdapter.targetRunning(AbstractIDECPUAdapter.java:82)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter.handleSyncEvent(CCStudioIDECPUAdapter.java:358)
     at com.ti.dvt.ccstudioideadapter.CCStudioIDECPUAdapter$MyDspUserListener.asyncHandleEvent(CCStudioIDECPUAdapter.java:164)
     at com.ti.dvt.debug.server.extensions.events.AsyncEventJob.run(AsyncEventJob.java:87)
     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

  • David,

    These are a few excerpts from the DSP/BIOS API guide:

    C.2.1 Enabling and Disabling EXC Support

             By default, the EXC module is enabled.

    C.2.2 Out-of-the-Box EXC Behavior

            The EXC module prints messages to the system log named LOG_system. This log’s output can be observed in CCS in a LOG window named "Execution Graph Details". These messages are intermixed with details of standard DSP/BIOS scheduling events and are flagged in the Execution Graph itself with a blue box. After all processing is finished, EXC calls SYS_abort to terminate the system.

            In general, when an application lands in SYS_abort, you should look in the "Execution Graph Details" window for a message related to the abort.

    The messages that go to LOG_system, shown in the "Execution Graph Details" window, will have all of the relevant registers decoded for you. Finding this information may help on this problem, or when similar problems happen in the future.

    David Meyers said:
    ( EFR = 0x00000002,   or IXF bit),  ( NRP =0x11827F88),  (NTSR= 0x0001020F) and (IERR = 0x00000008)

    David Meyers said:
    11827f80:   01BFC42A            MVK.S2        0x7f88,B3
              _HWI_lat2end1:
    11827f84:   0188C16A            MVKH.S2       0x11820000,B3
              doret2:
    11827f88:   178002CA            .word         0x178002ca
              doret2_noPop:
    11827f8c:   02198629            MVK.S1        0x330c,A4
    11827f90:   019A302A ||         MVK.S2        0x3460,B3

    From the register values, you determined the NRP value as shown above, and then showed the listing around that address. I feel confident that you also noted something particularly different about the assembly code at that NRP address, i.e. that there is not a valid assembly instruction at that address. ".word" is something that should not normally appear in assembly code, at least not when it is generated by the TI Compiler or is a part of one of our libraries.

    This tells you there is a bug in which your program code is being overwritten at the address shown above with the value shown there. Please keep in mind that this address is aliased at the Local L2 address of 0x00827F88.

    To do an initial "bounding" of the cause of this bug, you could use the following steps:

    • run the test a few times to see if it always fails at the same NRP address and with the same corrupted value
    • load your program using CCS and look at the to-be-corrupt location to confirm that it is okay at load time
    • use a CCS debug tool, such as a data write hardware breakpoint to narrow down the location of the corrupting write
    • the CCS menu Help->"Help contents" can help you with understanding how to use hardware breakpoints, if you are not already familiar with them

    Please let us know how this progresses.

    Regards,
    RandyP