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.

Unrecognized pragma

Hello

For a particular application I want to use INT5 in 6472. So I'm writing the ISR like this:

 

#pragma vector=5
__interrupt void my_isr(void)
{
    ...................

    return;
}

But it is giving a warning "unrecognized pragma". How to solve this problem? Do I need to include any header file to make it run?

Regards,

AC.

  • I forgot to mention that I am using code composer 4

     

    AC.

  • There is no special syntax or support in the C compiler to associate a function with a particular hardware interrupt.  That can be done with an interrupt vector table written in assembly.  Another method is to have a runtime executive such as BIOS do it for you.  Since such expertise is not present in this forum, I'll move this thread.

    Thanks and regards,

    -George

     

  • AC,

    Are you using any of our examples as a starting point, or are you writing code from scratch?

  • Mariana,

     

    Previously I looked at the codes for FPGA LED TEST, I2C UART LED, EVM Config etc. But because of the problem I'm facing now I am searching for the proper CSLs.

     

    Regards,

    AC.

  • For the C6472 CSL please see:

    http://focus.ti.com/docs/toolsw/folders/print/sprca03.html

    Is there a peripheral in particular that you want to start from?

    The interrupt module in the C64x+ processor is complex, it would be easier to help you by pointing you to an example.

  • The above link shows: "sorry! we couldn't find your page".

    I want to start from a timer generating an interrupt and that is handled by an ISR. At the beginning I'm trying to configure the EVTSET register bit to create  the appropriate event and then to handle it. I want to route event 16 through INT5.

    I like the main program to contain:

    int i;

    //no event to be combined through event combiner
        EVTMASK0=0xFFFFFFFF;
        EVTMASK1=0xFFFFFFFF;
        EVTMASK2=0xFFFFFFFF;
        EVTMASK3=0xFFFFFFFF;
       
        //EXPMASK registers by default contains all 1s thereby masking all exceptions
       
        //EVT16 will route through INT5
        INTMUX1=0x00001000;
       
        //enable interrupt
        CSR|=0x00000003;    //sets GIE & PGIE of CSR
        TSR|=0x00000005;    //sets GEE & GIE of TSR
        ITSR|=0x00000005;    //sets GEE & GIE of TSR
        IER|=0x00000022;    //sets NMIE & IE5 in IER
       
        for(i=1;i<5;i++){
            printf( "\ncode runs");
        }

    //event 16 is generated to make an interrupt
        EVTSET0=0x00010000;

    for(i=1;i<5;i++){
            printf( "\ncode is still running");
        }

    return;

     

    And I want the ISR to contain:

        EVTCLR0=0x00010000;
        printf( "\nprinting from the ISR");
        return;

     

    But I am unable to link the ISR (say with name "my_isr") with the actual interrupt channel.

    If I use DSP/BIOS support, is it that ROV is the only  interface? Cann't I access the CIO? I "like" CIO because in case of a multicore environment (I'm using 6472) there are different consoles for different cores. Can I get the same type of interface by ROV?

    If I use DSP/BIOS, I've seen how to link the ISR. But do I need to perform all the enablings (EVTMASK, INTMUX etc) through the tcf ? Would it be a problem if I want to do it from the main C program?

     

    Regards,

    AC.

  • I corrected the link, so please try again.

    You could start with the GPIO example in the software package in the link. It does something similar to what you want (it even driver the gpio by software):

    ...\csl_c6472\example\gpio\build\ccs4

    The example above does not use DSP/BIOS, it uses the functional CSL with the intc module.

    AC said:

    If I use DSP/BIOS support, is it that ROV is the only  interface? Cann't I access the CIO? I "like" CIO because in case of a multicore environment (I'm using 6472) there are different consoles for different cores. Can I get the same type of interface by ROV?

    If I use DSP/BIOS, I've seen how to link the ISR. But do I need to perform all the enablings (EVTMASK, INTMUX etc) through the tcf ? Would it be a problem if I want to do it from the main C program?

    I'm not sure about this one, can you make a separate post in the DSP/BIOS forum? (in case you want to use DSP/BIOS indeed).