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.

Problem with CSL_intcHookIsr() function

Other Parts Discussed in Thread: SPRC223

Hello,

I work with C6727 in CSS v6.1 and I encountered a strange problem
I'm working with CSL lib and  trying initialize  RTI interrupt in the same manner as in еxample.

The function "CSL_intcHookIsr()"  is hangs up.


            volatile Uint32              *gpCount0Addr = (Uint32 *) 0x620080A0;

             /* 
             * gpCount0Addr points to Base Addres of the Low Parameter Entry 
             * Table. As the Parameter Entry is ANY we should poll the proper 
             * PTE. Following one will caliculate the exact Parameter and, 
             * adding 2 (i.e +2) points to count0 value in the parameter Entry
             */
            gpCount0Addr = gpCount0Addr + hDmax->paramPtr + 2;

            /* Give a small delay before checking the transfer completion */
            response = 0x1000;
            while (response--);

            /* 
             * Waiting for DMAX trasfer complete. This check for count0 in 
             * one dimentional transfer. This routine is for setting 
             * interupt handler the transfer complete interrupt is not used 
             */
            do {
                response = *(Uint32 *) gpCount0Addr;
            } while (response != 0);

I get endless loop here .Why?




          

 

  • Hi Michael,

    Please mention the name of the TI package and its version you use.
    In which package this CSL lib function is enclosed? Look for any example which used this particular library function successfully.
  • Hi Shankari,

    I'm using CSL v3.x for TMS320C672x
    It's downloaded from TI and
    I compile it by CCS v6.1 ( compiler version 7.4.12)

    Rehards,
    Michael
  • Hi Michael,


    I think you might be using the wrong CSL. Please try this one:

    Kind regards,

    one and zero

  • Hi Shankari,

    I've forgot call :

    /* relocating the Interrupt Vector Table */
    CSL_intcSetVectorPtr (DEST_ADDR);


    What destination address do I must to set?

    My cmd file:

    MEMORY
    {
    SDRAM : origin = 0x80000000, len = 0x1000000
    IRAM : origin = 0x10000400, len = 0x3fc00
    IRAM_BOOT : origin = 0x10000000, len = 0x400
    FLASH_BOOT : origin = 0x90000000, len = 0x400
    FLASH_REST : origin = 0x90000400, len = 0x1fc00
    }

    SECTIONS
    {

    .text > IRAM
    .stack > IRAM
    .bss > IRAM
    .cio > IRAM
    .const > IRAM
    .data > IRAM
    .switch > IRAM
    .sysmem > IRAM
    .far > IRAM
    .args > IRAM
    .ppinfo > IRAM
    .ppdata > IRAM

    /* COFF sections */
    .pinit > IRAM
    .cinit > IRAM

    /* EABI sections */
    .binit > IRAM
    .init_array > IRAM
    .neardata > IRAM
    .fardata > IRAM
    .rodata > IRAM
    .c6xabi.exidx > IRAM
    .c6xabi.extab > IRAM
    }

    Regards,
    Michael
  • Hi Michael,

    As per the package, csl_C672x_intc_03_00_09_00 and the example located at ~\dsp\examples\c672x\intc\src\intc_example.c , the address is 0x10000000

    #define DEST_ADDR                0x10000000

    CSL_intcSetVectorPtr (DEST_ADDR);

  • Michael,

    Are you applying the ROM patch code?

    Are the values in the dMax register area around the gpCount0Addr initialized when your code reaches this loop where it loops forever? The dMax initialization would be done before calling the CSL_intcHookIsr function.

    Regards,
    RandyP
  • Hi Shankari,

    That's exactly what I did.

    But the timer interruption did not happen.

    Regards,

    Michael

  • Hi RandyP,

    1. The old project on CCSv3 which I have contains two files :
    applyPach.obj,
    c672xRomPatchV1_00_00.lib

    Do I need to apply these patches or the others if I create a new project in CCSv6.1 for the C6727?
    Is it necessary to have any patches if I create a project for the C6727 in CCSv6?

    2. I've forgot call :

    CSL_intcSetVectorPtr (DEST_ADDR);
    Because this was an infinite loop.

    Regars,
    Michael
  • Michael,

    Michael Pollack said:
    1. Is it necessary to have any patches if I create a project for the C6727 in CCSv6?

    The patches are not for the CodeGen build tool but for the proper operation of the device.

    Michael Pollack said:
    2. I've forgot call :

    CSL_intcSetVectorPtr (DEST_ADDR);
    Because this was an infinite loop.

    Sorry, but I am not sure what you mean by 'forgot' (forgot to tell us or left it out of your code) or 'this' (the thread topic function or the function named in #2). You should be following example code as pointed out by Shankari earlier. If you are leaving parts out, that can be expected to cause a problem.

    Regards,
    RandyP

  • Hi RandyP,

    Project "Rti_example" from sprc223.zip of TI  works. RTI interrupt occured.
    Thank you.

    Best Regards,
    Michael