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.

Code crashing with message instruction fetch exception

Dear Experts :

                                 My code has undergone migration changes from dsp bios to sys bios. While running the code in CCS v5, i get the following instruction fetch error copied below. While looking through some posts on similar topic , i read that i had to check the register B3 and the address of NRP. I checked using the disassembly tab and i see that NRP address range doesnt exist in the*.map file and the address in itself points to NOP. B3 register also looks suspicious with 0x0. What couldbe the problem? Please help.

[C64XP_2] d        3 0303014f message received        3 0303014fA0=0x0 A1=0x0

A2=0x0 A3=0xe00964e0

A4=0xe0081db8 A5=0xe0081da8

A6=0x0 A7=0x1

A8=0xb7d0000 A9=0x100000

A10=0x2 A11=0xe0081da8

A12=0x2 A13=0xe0081da8

A14=0x2 A15=0xe0081da8

A16=0xc2ccb388 A17=0x92f[C64XP_2] d606d

A18=0xe0073128 A19=0x20

A20=0x4c A21=0x0

A22=0x0 A23=0x0

A24=0x0 A25=0x0

A26=0xffffffff A27=0xf8000

A28=0x0 A29=0x1

A30=0x28b A31=0xe00964b4

B0=0x0 B1=0x0

B2=0x80000000 B3=0x0

B4=0xe7b0300 B5=0xe0049023

B6=0x159 B7=0x1

B8=0x0 B9=0x0

B10=0x0 B11=0xe7b[C64XP_2] 0300

B12=0x0 B13=0xe7b0300

B14=0xe00ac200 B15=0x30

B16=0x0 B17=0x0

B18=0x0 B19=0x400

B20=0x0 B21=0x0

B22=0x0 B23=0x0

B24=0x0 B25=0xffffffff

B26=0x0 B27=0x0

B28=0x0 B29=0xfffffc00

B30=0x1 B31=0xe0053840

NTSR=0x1000e

ITSR=0xd

IRP=0xe004ea18

SSR=0x0

AMR=0x0

R[C64XP_2] ILC=0x0

ILC=0x0

Exception at 0xe7b0300

EFR=0x2 NRP=0xe7b0300

Internal exception: IERR=0x1

Instruction fetch exception

ti.sysbios.family.c64p.Exception: line 248: E_exceptionMin: pc = 0xe004ea18, sp = 0x00000030.

xdc.runtime.Error.raise: terminating executi[C64XP_2] on

Aparna

  • aparna sub said:
    B15=0x30

    B15 is your stack pointer, and clearly 0x30 is not a good value.  This helps to explain why B3 contains 0 - it gets saved on the stack and then restored from the stack before the function returns through it.  It also is probably the reason that your code went into the weeds and ended up executing from 0x0e7b0300 (as reflected in the NRP register).

    Can you use ROV to check your application's Task stack values and the system ISR stack value?  I suspect one of them has overflowed and needs to be increased in size.

    Also, register A3 is sometimes the function return register.  Does the address in A3 contain a function return point?  If so, look for branches through registers just above this A3 address, and if there is one (or more), check to see if that branch register contains a value that would lead the PC to execute from the range of 0x0e7b0300.

    Regards,

    - Rob