AnsweredAssumed Answered

free rtos gpt timer callback latency issue

Question asked by Vasudhevan G on Mar 19, 2020
Latest reply on May 7, 2020 by Vasudhevan G


    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_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 */

    Why timer callback interrupt latency more ?

    How to solve this issue ?


    Thanks & Regards,