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.

Delay in running interrupt service routine

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

Hi 

Trying to service ADC data ready signal with an interrupt service routine it has about 4 micro second delay which is around 1200 CPU cycles which is not acceptable in my case.

I am working with OMAPL138 StarterWare 1_10_04_01 and CSS 5.4.0.00091 and INT4.

I did not have  such a problem with CSS 3.3 and DSP/BIOS. There was a option there to disable dispatcher for interrupt (which may be relevant) and I did not find similar option with CCS 5.

Any idea?

Thanks.

  • Hi,

    We are checking out this request and will get back to you shortly.

    Thanks & regards,
    Sivaraj K
  • Hi Alireza,

    With which board you are working with ? OMAPL138 LCDK or OMAPL138 EVM.
    Which example code you are trying in starterware package ? Are you using as-is example code or modified .

    Have you tried using Optimization level. Does that make any difference ?
  • Thanks for replying.

    I am using Experimenr Kit and a modified GPIO example.

    I changed compiler option to optimize for speed but made no difference.

    My code in ISR is as simple as changing GPIO out register by HWREG. so I think delay should be  from interrupt pin chage to the start of IRS.

    Thanks

     

  • Dear Alireza,
    Can you please provide your modified example to reproduce the problem in OMAPL138 EVM board ?
    Also try to increase the DSP operating clock speed to 456MHz and check.
  • Dear Titus:

    Here is my code:

    static void testIntIsr(void)
    {
    *((volatile unsigned int *)(SOC_GPIO_0_REGS + 0x14)) |= 0x00000080;
    *((volatile unsigned int *)(SOC_GPIO_0_REGS + 0x14)) &= 0xFFFFFF7F;
    /* Clears the system interrupt status of GPIO in AINTC.*/
    IntEventClear(SYS_INT_GPIO_B0INT);
    /* Clears the Interrupt Status of GP4[0] in GPIO.*/
    GPIOPinIntClear(SOC_GPIO_0_REGS, 1);
    }

    int main(void)
    {
    /* The Local PSC number for GPIO is 3. GPIO belongs to PSC1 module.*/
    PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_GPIO, PSC_POWERDOMAIN_ALWAYS_ON,
    PSC_MDCTL_NEXT_ENABLE);


    GPIODirModeSet(SOC_GPIO_0_REGS, 1, GPIO_DIR_INPUT);/* Sets the pin 0(GP0[0]) as input.*/
    GPIODirModeSet(SOC_GPIO_0_REGS, 8, GPIO_DIR_OUTPUT);/* Sets the pin 0(GP0[7]) as output.*/
    PinMuxSetup(1,0xF000000f,0x80000008);

    GPIOIntTypeSet(SOC_GPIO_0_REGS, 1, GPIO_INT_TYPE_FALLEDGE );
    GPIOBankIntEnable(SOC_GPIO_0_REGS, 0); /* Enable interrupts for Bank 0.*/
    IntRegister(C674X_MASK_INT4, testIntIsr); // Register the ISR in the Interrupt Vector Table
    IntEventMap(C674X_MASK_INT4, SYS_INT_GPIO_B0INT); // Map the system interrupt to the DSP maskable interrupt

    // Enable DSP maskable interrupt
    IntEnable(C674X_MASK_INT4);
    IntGlobalEnable();
    while(1);
    }

    Regarding increase CPU speed I only found  Set_Core_300MHz in gel file.

    Should i add a new function in GEL file for 456 MHz?

    Regard,

    Alireza

  • Dear Alireza,

    Regarding increase CPU speed I only found Set_Core_300MHz in gel file.

    Should i add a new function in GEL file for 456 MHz?

    Yes, you can refer to the C6748LCDK board gel file.
    C:\ti\ccsv5\ccs_base\emulation\boards\lcdkomapl138\gel\OMAP-L138_LCDK.gel