AnsweredAssumed Answered

timer callback latency issue

Question asked by Vasudhevan G on May 11, 2020
Latest reply on Jul 6, 2020 by Vasudhevan G

Hi,

    Board = imx rt 1064evk.

    If i run evkmimxrt1064_gpt_timer example code timer generating 1 second delay.

    Same code copied into my free rtos project but timer callback calling after 3-5 seconds delay.

GPT_GetDefaultConfig(&gptConfig);
    GPT_Init(ELMEASURE_GPT, &gptConfig);      /* Initialize GPT module */
    GPT_SetClockDivider(ELMEASURE_GPT, 3);    /* Divide GPT clock source frequency by 3 inside GPT module */
    gptFreq = ELMEASURE_GPT_CLK_FREQ;         /* Get GPT clock frequency */
    gptFreq /= 3;                             /* GPT frequency is divided by 3 inside module */
    GPT_SetOutputCompareValue(ELMEASURE_GPT, kGPT_OutputCompare_Channel1, gptFreq);  /* Set both GPT modules to 1 second duration */
    GPT_EnableInterrupts(ELMEASURE_GPT, kGPT_OutputCompare1InterruptEnable);    /* Enable GPT Output Compare1 interrupt */
    NVIC_SetPriority(GPT_IRQ_ID, 4U);/* Enable at the Interrupt */
    EnableIRQ(GPT_IRQ_ID);

    Why timer callback interrupt latency more ?

    How to solve this issue ?

 

    Thanks & Regards,

          Vasu

Outcomes