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.

Bios 6 c64xp exceptions

Other Parts Discussed in Thread: SYSBIOS

Hi folks,

I am triying to use the exception handler that is plugged by default by bios6, however I can not get the traces that are suposed to be triggered once an exception occurs, here is my configuration:

var ExceptionDSP  = xdc.useModule('ti.sysbios.family.c64p.Exception');
ExceptionDSP.enablePrint = true;

var Hwi           = xdc.useModule('ti.sysbios.family.c64p.Hwi');
Hwi.enableException = true;

ExceptionDSP.nmiHook = '&myIntHookFxn';

 

In my C source file I am calling the SWE instruction:

asm(" SWE");

Which is supposed to cause an internal exception.

However, the myIntHookFxn()function is not being called, also there are not any traces (from System_printf()) observed.

 

Do you know if it is possible to test the exception handler with a SWE instruction? If not which is the easiest way to create an NMI or internal excetption?

 

Regards,

Armando.

 

 

 

  • Armando,

    The SWE instruction is actually not an internal exception.  Its a software exception.  BIOS detects this and simply returns to the NRP register.  It does not support calling any sort of hook function for a SWE.  If all you want to do is test out your internal exception hook you can try out the following asm statements in a 'c' file.

    asm("       mvk 1, a1; \n \
                      mvk 1, a0; \n \
             [a1]  mvk 0, b0; \n \
           ||[a0]  mv a0, b0; ");

    This should generate an internal resource conflict exception.

    Judah

  • Thanks Judah,

     

    Actually theTMS320C64x/C64x+ DSP CPU and Instruction Set document is the one who states that the SWE instruction generates an internal Exception:

    Description: Causes an internal exception to be taken. It can be used as a mechanism for User mode
    programs to request Supervisor mode services. Execution of the SWE instruction results
    in an exception being recognized in the E1 pipeline phase containing the SWE
    instruction. The SXF bit in EFR is set to 1.

    Anyway, thanks for the suggestion I will try it, I guess that when this code is executed and after all the System_printf() tracesmy Internal Exception hook must  run, rigth?

     

    Regards,

    Armando