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.

Hwi_dispatchAlways opcode exception

Other Parts Discussed in Thread: SYSBIOS

Hello,

We have a problem in our program which returns this exception. We suspect that it occurs when an ethernet interrupt is hit. If I post some data from the PC to the dsp it occurs, but it doesn't occur always. We have checked in the ROV that the stacks are not overflowed, the stackpeaks are well below the stacksize. In the ccs register view we filled in the SP, PC and B3 of which the results can be seen in the attached image. furthermore the B3 seems to point to the knl_idle_loop.

The Hwi's are used as follows:

HWIisr HWI number
Eventcombiner NDK 0 7
Eventcombiner NDK 1 8
Eventcombiner NDK 2 9
Eventcombiner NDK 3 10
BIOS timer tick 14
GPIO Event ID 83 5
GPIO Event ID 85 4
GPIO Event ID 84 13
GPIO Event ID 86 12

[C66xx_0] A0=0x8b131de0 A1=0xe
A2=0x0 A3=0x2c
A4=0x1 A5=0x20
A6=0x122 A7=0x1
A8=0x0 A9=0x8b0f979c
A10=0x0 A11=0x0
A12=0x0 A13=0x0
A14=0x0 A15=0x0
A16=0x10 A17=0x0
A18=0x8ae60044 A19=0x20
A20=0x0 A21=0x0
A22=0x0 A23=0x0
A24=0x0 A25=0x0
A26=0x0 A27=0x2005000
A28=0x0 A[C66xx_0] 29=0x43
A30=0x42 A31=0x17
B0=0x0 B1=0x8ae34678
B2=0x8b0260c0 B3=0x8b0260d0
B4=0x15000103 B5=0x2
B6=0x8 B7=0x8ae34678
B8=0x8ae5e580 B9=0x1
B10=0x8b131ee8 B11=0x0
B12=0x0 B13=0x0
B14=0x8b13de00 B15=0x8b131de0
B16=0x0 B17=0x8b127aa8
B18=0x3 B19=0x0
B20=0x0 B2[C66xx_0] 1=0x2e2
B22=0x2e20000 B23=0x0
B24=0x0 B25=0x3000
B26=0x3000 B27=0x0
B28=0x0 B29=0x3
B30=0xbc B31=0x8ae5e580
NTSR=0x10204
ITSR=0xf
IRP=0x8b0260d0
SSR=0x0
AMR=0x0
RILC=0x0
ILC=0x0
Exception at 0x8b002098
EFR=0x2 NRP=0x8b002098
Internal exception: IERR=0x8
Op[C66xx_0] code exception
ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0x8b002098, sp = 0x8b131de0.
To see more exception detail, use ROV or set 'ti.sysbios.family.c64p.Exception.enablePrint = true;'
xdc.runtime.Error.raise: terminating execution

  • One other thing we have found was, the whole program runs on DDR3 memory and we think that there might be a caching problem which returns this exception. The whole program is to big for the internal memory, so we tried running an echoing ndk example on DDR3 and on MSMCSRAM. Which also returns the opcode error once in a while on DDR3. We don't know for sure but we think that the problem lays over there. Could some one please give us some advice on where to put what in the memory?

    See below for the memorymap in cfg:

    /* Create our memory map - i.e. this is equivalent to linker.cmd */
    Program.sectMap["sharedL2"] = "DDR3";
    Program.sectMap["systemHeap"] = "DDR3";
    Program.sectMap[".sysmem"] = "DDR3";
    Program.sectMap[".args"] = "DDR3";
    Program.sectMap[".cio"] = "DDR3";
    Program.sectMap[".far"] = "DDR3";
    Program.sectMap[".rodata"] = "DDR3";
    Program.sectMap[".neardata"] = "DDR3";
    Program.sectMap[".cppi"] = "DDR3";
    Program.sectMap[".init_array"] = "DDR3";
    Program.sectMap[".qmss"] = "DDR3";
    Program.sectMap[".cinit"] = "DDR3";
    Program.sectMap[".bss"] = "DDR3";
    Program.sectMap[".const"] = "DDR3";
    Program.sectMap[".text"] = "DDR3";
    Program.sectMap[".code"] = "DDR3";
    Program.sectMap[".switch"] = "DDR3";
    Program.sectMap[".data"] = "DDR3";
    Program.sectMap[".fardata"] = "DDR3";
    Program.sectMap[".args"] = "DDR3";
    Program.sectMap[".cio"] = "DDR3";
    Program.sectMap[".vecs"] = "DDR3";
    Program.sectMap["platform_lib"] = "DDR3";
    Program.sectMap[".far:taskStackSection"] = "DDR3";
    Program.sectMap[".stack"] = "DDR3";
    Program.sectMap["EXTERN"] = "DDR3";
    Program.sectMap[".nimu_eth_ll2"] = "DDR3";
    Program.sectMap[".resmgr_memregion"] = {loadSegment: "DDR3", loadAlign:128}; /* QMSS descriptors region */
    Program.sectMap[".resmgr_handles"] = {loadSegment: "DDR3", loadAlign:16}; /* CPPI/QMSS/PA Handles */
    Program.sectMap[".resmgr_pa"] = {loadSegment: "DDR3", loadAlign:8}; /* PA Memory */
    Program.sectMap[".far:IMAGEDATA"] = {loadSegment: "DDR3", loadAlign: 8};
    Program.sectMap[".far:NDK_OBJMEM"] = {loadSegment: "DDR3", loadAlign: 8};
    Program.sectMap[".far:NDK_PACKETMEM"] = {loadSegment: "DDR3", loadAlign: 128};
  • Hi Marthijn,
    From the screen capture of your disassembly view I see the exception is happening when executing the code at address 0x8b00209c or 0x8b002090. I believe there's memory corruption at those locations looking at the contents at those addresses. There's probably a stray write going on somewhere in your application. I suggest you put a watch-point at both of those addresses and see where in your application you're writing to them.

    Regards,
    Moses